Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for GetDirFsInfo (0.21 sec)

  1. pkg/kubelet/cadvisor/testing/cadvisor_mock.go

    }
    
    // GetDirFsInfo mocks base method.
    func (m *MockInterface) GetDirFsInfo(path string) (v2.FsInfo, error) {
    	m.ctrl.T.Helper()
    	ret := m.ctrl.Call(m, "GetDirFsInfo", path)
    	ret0, _ := ret[0].(v2.FsInfo)
    	ret1, _ := ret[1].(error)
    	return ret0, ret1
    }
    
    // GetDirFsInfo indicates an expected call of GetDirFsInfo.
    func (mr *MockInterfaceMockRecorder) GetDirFsInfo(path any) *gomock.Call {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. pkg/kubelet/cadvisor/testing/cadvisor_fake.go

    // ContainerFsInfo is a fake implementation of Interface.ContainerFsInfo.
    func (c *Fake) ContainerFsInfo() (cadvisorapiv2.FsInfo, error) {
    	return cadvisorapiv2.FsInfo{}, nil
    }
    
    // GetDirFsInfo is a fake implementation of Interface.GetDirFsInfo.
    func (c *Fake) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) {
    	return cadvisorapiv2.FsInfo{}, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 22:07:20 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  3. pkg/kubelet/cadvisor/cadvisor_windows.go

    	return cadvisorapiv2.FsInfo{}, nil
    }
    
    func (cu *cadvisorClient) RootFsInfo() (cadvisorapiv2.FsInfo, error) {
    	return cu.GetDirFsInfo(cu.rootPath)
    }
    
    func (cu *cadvisorClient) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) {
    	return cu.winStatsClient.GetDirFsInfo(path)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 22:07:20 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  4. pkg/kubelet/winstats/winstats.go

    			Memory: cadvisorapiv2.MemorySpec{
    				Limit: nodeInfo.memoryPhysicalCapacityBytes,
    			},
    		},
    		Stats: stats,
    	}
    
    	return &rootInfo, nil
    }
    
    // GetDirFsInfo returns filesystem capacity and usage information.
    func (c *StatsClient) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) {
    	var freeBytesAvailable, totalNumberOfBytes, totalNumberOfFreeBytes int64
    	var err error
    
    	ret, _, err := syscall.Syscall6(
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 5.2K bytes
    - Viewed (0)
  5. pkg/kubelet/winstats/winstats_test.go

    	// Try with a non-existent path.
    	_, err := c.GetDirFsInfo("foo/lish")
    	expectedErrMsg := "The system cannot find the path specified."
    	if err == nil || err.Error() != expectedErrMsg {
    		t.Fatalf("expected error message `%s` but got `%v`", expectedErrMsg, err)
    	}
    
    	dir, err := os.MkdirTemp("", "fsinfo")
    	assert.NoError(t, err)
    	defer os.RemoveAll(dir)
    
    	fsInfo, err := c.GetDirFsInfo(dir)
    	assert.NoError(t, err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 13 12:08:15 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  6. pkg/kubelet/cadvisor/cadvisor_unsupported.go

    	return cadvisorapiv2.FsInfo{}, errUnsupported
    }
    
    func (cu *cadvisorUnsupported) ContainerFsInfo() (cadvisorapiv2.FsInfo, error) {
    	return cadvisorapiv2.FsInfo{}, errUnsupported
    }
    
    func (cu *cadvisorUnsupported) GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error) {
    	return cadvisorapiv2.FsInfo{}, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 22:07:20 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  7. pkg/kubelet/cadvisor/types.go

    	// KEP 4191 can separate the image filesystem
    	ContainerFsInfo() (cadvisorapiv2.FsInfo, error)
    
    	// Get filesystem information for the filesystem that contains the given file.
    	GetDirFsInfo(path string) (cadvisorapiv2.FsInfo, error)
    }
    
    // ImageFsInfoProvider informs cAdvisor how to find imagefs for container images.
    type ImageFsInfoProvider interface {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 22:07:20 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  8. pkg/kubelet/cadvisor/cadvisor_linux.go

    	if err != nil {
    		return cadvisorapiv2.FsInfo{}, err
    	}
    	return cc.getFsInfo(label)
    }
    
    func (cc *cadvisorClient) RootFsInfo() (cadvisorapiv2.FsInfo, error) {
    	return cc.GetDirFsInfo(cc.rootPath)
    }
    
    func (cc *cadvisorClient) getFsInfo(label string) (cadvisorapiv2.FsInfo, error) {
    	res, err := cc.GetFsInfo(label)
    	if err != nil {
    		return cadvisorapiv2.FsInfo{}, err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 22:07:20 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  9. pkg/kubelet/stats/cri_stats_provider_test.go

    	}
    
    	mockCadvisor.EXPECT().ContainerInfoV2("/", options).Return(infos, nil)
    	mockCadvisor.EXPECT().RootFsInfo().Return(rootFsInfo, nil)
    	mockCadvisor.EXPECT().GetDirFsInfo(imageFsMountpoint).Return(imageFsInfo, nil)
    	mockCadvisor.EXPECT().GetDirFsInfo(unknownMountpoint).Return(cadvisorapiv2.FsInfo{}, cadvisorfs.ErrNoSuchDevice)
    
    	fakeRuntimeService.SetFakeSandboxes([]*critest.FakePodSandbox{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  10. pkg/kubelet/stats/cri_stats_provider.go

    	if fsID == nil {
    		klog.V(2).InfoS("Failed to get filesystem info: fsID is nil")
    		return nil, nil
    	}
    	mountpoint := fsID.GetMountpoint()
    	fsInfo, err := p.cadvisor.GetDirFsInfo(mountpoint)
    	if err != nil {
    		msg := "Failed to get the info of the filesystem with mountpoint"
    		if errors.Is(err, cadvisorfs.ErrNoSuchDevice) ||
    			errors.Is(err, cadvisorfs.ErrDeviceNotInPartitionsMap) ||
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 18:46:33 UTC 2023
    - 35.1K bytes
    - Viewed (0)
Back to top