Documentation
¶
Overview ¶
Package util is a generated GoMock package.
Index ¶
- Constants
- func BytesToGiB(volumeSizeBytes int64) int64
- func ConvertTagsToMap(tags string, tagsDelimiter string) (map[string]string, error)
- func GetKubeClient(kubeconfig string, kubeAPIQPS float64, kubeAPIBurst int, userAgent string) (kubernetes.Interface, error)
- func GetMountOptions(options []string) string
- func GiBToBytes(volumeSizeGiB int64) int64
- func MakeDir(pathname string, perm os.FileMode) error
- func RoundUpBytes(volumeSizeBytes int64) int64
- func RoundUpGiB(volumeSizeBytes int64) int64
- func SetVolumeOwnership(path, gid, policy string) error
- func TrimDuplicatedSpace(s string) string
- func WaitUntilTimeout(timeout time.Duration, execFunc ExecFunc, timeoutFunc TimeoutFunc) error
- type Azcopy
- type AzcopyJobState
- type EXEC
- type ExecCommand
- type ExecFunc
- type LockMap
- type MockEXEC
- type MockEXECMockRecorder
- type OsInfo
- type TimeoutFunc
- type VolumeMounter
- func (l *VolumeMounter) CanMount() error
- func (l *VolumeMounter) GetAttributes() volume.Attributes
- func (l *VolumeMounter) GetMetrics() (*volume.Metrics, error)
- func (l *VolumeMounter) GetPath() string
- func (l *VolumeMounter) SetUp(_ volume.MounterArgs) error
- func (l *VolumeMounter) SetUpAt(_ string, _ volume.MounterArgs) error
Constants ¶
const ( GiB = 1024 * 1024 * 1024 TiB = 1024 * GiB )
Variables ¶
This section is empty.
Functions ¶
func ConvertTagsToMap ¶ added in v1.2.0
func GetKubeClient ¶ added in v1.23.3
func GetMountOptions ¶
GetMountOptions return options with string list separated by space
func RoundUpBytes ¶
RoundUpBytes rounds up the volume size in bytes up to multiplications of GiB in the unit of Bytes
func RoundUpGiB ¶
RoundUpGiB rounds up the volume size in bytes up to multiplications of GiB in the unit of GiB
func SetVolumeOwnership ¶ added in v1.24.0
SetVolumeOwnership would set gid for path recursively
func TrimDuplicatedSpace ¶ added in v1.19.5
func WaitUntilTimeout ¶ added in v1.24.1
func WaitUntilTimeout(timeout time.Duration, execFunc ExecFunc, timeoutFunc TimeoutFunc) error
WaitUntilTimeout waits for the exec function to complete or return timeout error
Types ¶
type Azcopy ¶ added in v1.23.2
type Azcopy struct {
ExecCmd EXEC
}
func (*Azcopy) GetAzcopyJob ¶ added in v1.23.2
func (ac *Azcopy) GetAzcopyJob(dstBlobContainer string, authAzcopyEnv []string) (AzcopyJobState, string, error)
GetAzcopyJob get the azcopy job status if job existed
type AzcopyJobState ¶ added in v1.23.2
type AzcopyJobState string
const ( AzcopyJobError AzcopyJobState = "Error" AzcopyJobNotFound AzcopyJobState = "NotFound" AzcopyJobRunning AzcopyJobState = "Running" AzcopyJobCompleted AzcopyJobState = "Completed" )
type ExecCommand ¶ added in v1.23.2
type ExecCommand struct { }
func (*ExecCommand) RunCommand ¶ added in v1.23.2
func (ec *ExecCommand) RunCommand(cmdStr string, authEnv []string) (string, error)
type ExecFunc ¶ added in v1.24.1
type ExecFunc func() (err error)
ExecFunc returns a exec function's output and error
type LockMap ¶ added in v0.9.0
LockMap used to lock on entries
func (*LockMap) LockEntry ¶ added in v0.9.0
LockEntry acquires a lock associated with the specific entry
func (*LockMap) UnlockEntry ¶ added in v0.9.0
UnlockEntry release the lock associated with the specific entry
type MockEXEC ¶ added in v1.23.2
type MockEXEC struct {
// contains filtered or unexported fields
}
MockEXEC is a mock of EXEC interface.
func NewMockEXEC ¶ added in v1.23.2
func NewMockEXEC(ctrl *gomock.Controller) *MockEXEC
NewMockEXEC creates a new mock instance.
func (*MockEXEC) EXPECT ¶ added in v1.23.2
func (m *MockEXEC) EXPECT() *MockEXECMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockEXECMockRecorder ¶ added in v1.23.2
type MockEXECMockRecorder struct {
// contains filtered or unexported fields
}
MockEXECMockRecorder is the mock recorder for MockEXEC.
func (*MockEXECMockRecorder) RunCommand ¶ added in v1.23.2
func (mr *MockEXECMockRecorder) RunCommand(arg0, arg1 interface{}) *gomock.Call
RunCommand indicates an expected call of RunCommand.
type TimeoutFunc ¶ added in v1.24.1
type TimeoutFunc func() (err error)
TimeoutFunc returns output and error if an ExecFunc timeout
type VolumeMounter ¶ added in v1.24.0
type VolumeMounter struct {
// contains filtered or unexported fields
}
func (*VolumeMounter) CanMount ¶ added in v1.24.0
func (l *VolumeMounter) CanMount() error
func (*VolumeMounter) GetAttributes ¶ added in v1.24.0
func (l *VolumeMounter) GetAttributes() volume.Attributes
func (*VolumeMounter) GetMetrics ¶ added in v1.24.0
func (l *VolumeMounter) GetMetrics() (*volume.Metrics, error)
func (*VolumeMounter) GetPath ¶ added in v1.24.0
func (l *VolumeMounter) GetPath() string
func (*VolumeMounter) SetUp ¶ added in v1.24.0
func (l *VolumeMounter) SetUp(_ volume.MounterArgs) error
func (*VolumeMounter) SetUpAt ¶ added in v1.24.0
func (l *VolumeMounter) SetUpAt(_ string, _ volume.MounterArgs) error