Documentation ¶
Overview ¶
Package util is a generated GoMock package.
Index ¶
- Constants
- func BytesToGiB(volumeSizeBytes int64) int64
- func GiBToBytes(volumeSizeGiB int64) int64
- func RoundUpBytes(volumeSizeBytes int64) int64
- func RoundUpGiB(volumeSizeBytes int64) int64
- func RunPowershellCmd(command string, envs ...string) ([]byte, error)
- func WaitUntilTimeout(timeout time.Duration, execFunc ExecFunc, timeoutFunc TimeoutFunc) error
- type Azcopy
- type AzcopyJobState
- type EXEC
- type ExecCommand
- type ExecFunc
- type MockEXEC
- type MockEXECMockRecorder
- type TimeoutFunc
Constants ¶
const ( GiB = 1024 * 1024 * 1024 MaxPathLengthWindows = 260 )
Variables ¶
This section is empty.
Functions ¶
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 RunPowershellCmd ¶ added in v1.28.0
func WaitUntilTimeout ¶ added in v1.29.7
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.29.1
type Azcopy struct {
ExecCmd EXEC
}
func (*Azcopy) GetAzcopyJob ¶ added in v1.29.1
func (ac *Azcopy) GetAzcopyJob(dstFileshare string, authAzcopyEnv []string) (AzcopyJobState, string, error)
GetAzcopyJob get the azcopy job status if job existed
type AzcopyJobState ¶ added in v1.29.1
type AzcopyJobState string
const ( AzcopyJobError AzcopyJobState = "Error" AzcopyJobNotFound AzcopyJobState = "NotFound" AzcopyJobRunning AzcopyJobState = "Running" AzcopyJobCompleted AzcopyJobState = "Completed" )
type ExecCommand ¶ added in v1.29.1
type ExecCommand struct { }
func (*ExecCommand) RunCommand ¶ added in v1.29.1
func (ec *ExecCommand) RunCommand(cmdStr string, authEnv []string) (string, error)
type ExecFunc ¶ added in v1.29.7
type ExecFunc func() (err error)
ExecFunc returns a exec function's output and error
type MockEXEC ¶ added in v1.29.1
type MockEXEC struct {
// contains filtered or unexported fields
}
MockEXEC is a mock of EXEC interface.
func NewMockEXEC ¶ added in v1.29.1
func NewMockEXEC(ctrl *gomock.Controller) *MockEXEC
NewMockEXEC creates a new mock instance.
func (*MockEXEC) EXPECT ¶ added in v1.29.1
func (m *MockEXEC) EXPECT() *MockEXECMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockEXECMockRecorder ¶ added in v1.29.1
type MockEXECMockRecorder struct {
// contains filtered or unexported fields
}
MockEXECMockRecorder is the mock recorder for MockEXEC.
func (*MockEXECMockRecorder) RunCommand ¶ added in v1.29.1
func (mr *MockEXECMockRecorder) RunCommand(arg0, arg1 interface{}) *gomock.Call
RunCommand indicates an expected call of RunCommand.
type TimeoutFunc ¶ added in v1.29.7
type TimeoutFunc func() (err error)
TimeoutFunc returns output and error if an ExecFunc timeout