Documentation ¶
Index ¶
- Constants
- Variables
- func AddFinalizer(name string, obj runtime.Object) error
- func Backoff(maxDuration time.Duration, timeoutMessage string, f func() (bool, error)) error
- func CheckBackupType(backupTarget string) (string, error)
- func CmdOutLines(cmd *exec.Cmd, cancel <-chan interface{}) (<-chan string, <-chan error)
- func ConfigBackupCredential(backupTarget string, credential map[string]string) error
- func ConfigEnvWithCredential(backupTarget string, credentialSecret string, hasEndpoint bool, ...) error
- func ControllerAddress(volumeName string) string
- func ConvertSize(size interface{}) (int64, error)
- func CopyReq(req *http.Request) *http.Request
- func Execute(binary string, args ...string) (string, error)
- func ExecuteWithTimeout(timeout time.Duration, binary string, args ...string) (string, error)
- func FinalizerExists(name string, obj runtime.Object) bool
- func FormatLocalTime(t time.Time, loc *time.Location) string
- func FormatTimeZ(t time.Time) string
- func FromMillis(t int64) time.Time
- func GetBackupID(backupURL string) (string, error)
- func GetChecksumSHA512(data []byte) string
- func GetInitiatorNSPath() string
- func GetLocalIPs() ([]string, error)
- func GetRequiredEnv(key string) (string, error)
- func GetStringChecksum(data string) string
- func LimitToPeriod(p, t [2]time.Time) [2]time.Time
- func Now() string
- func ParseLabels(labels []string) (map[string]string, error)
- func ParseLocalTime(ts string, loc *time.Location) (time.Time, error)
- func ParsePeriod(s string, loc *time.Location) ([2]time.Time, error)
- func ParseTime(t string) (time.Time, error)
- func ParseTimeZ(s string) (time.Time, error)
- func RandomID() string
- func RegisterShutdownChannel(done chan struct{})
- func RemoveFinalizer(name string, obj runtime.Object) error
- func RemoveHostDirectoryContent(directory string) (err error)
- func ReplicaAddress(name, volumeName string) string
- func ReplicaName(address, volumeName string) string
- func RetryOnConflictCause(fn func() (interface{}, error)) (obj interface{}, err error)
- func RoundUpSize(size int64) int64
- func RunAsync(wg *sync.WaitGroup, f func())
- func SplitStringToMap(str, separator string) map[string]struct{}
- func TimestampAfterTimeout(ts string, timeout time.Duration) bool
- func UUID() string
- func ValidateName(name string) bool
- func VolumeStackName(volumeName string) string
- func WaitForAPI(url string, timeout int) error
- func WaitForDevice(dev string, timeout int) error
- type DiskInfo
- type MetadataConfig
Constants ¶
View Source
const ( VolumeStackPrefix = "volume-" ControllerServiceName = "controller" ReplicaServiceName = "replica" BackupStoreTypeS3 = "s3" AWSAccessKey = "AWS_ACCESS_KEY_ID" AWSSecretKey = "AWS_SECRET_ACCESS_KEY" AWSEndPoint = "AWS_ENDPOINTS" )
Variables ¶
View Source
var ( ConflictRetryInterval = 20 * time.Millisecond ConflictRetryCounts = 100 )
Functions ¶
func CheckBackupType ¶
func CmdOutLines ¶
func ConfigBackupCredential ¶
func ConfigEnvWithCredential ¶
func ControllerAddress ¶
func ConvertSize ¶
func ExecuteWithTimeout ¶
func FormatTimeZ ¶
func FromMillis ¶
func GetBackupID ¶
func GetChecksumSHA512 ¶
func GetInitiatorNSPath ¶
func GetInitiatorNSPath() string
func GetLocalIPs ¶
func GetRequiredEnv ¶
func GetStringChecksum ¶
func RegisterShutdownChannel ¶
func RegisterShutdownChannel(done chan struct{})
func RemoveHostDirectoryContent ¶ added in v0.3.3
func ReplicaAddress ¶
func ReplicaName ¶
func RetryOnConflictCause ¶
func RoundUpSize ¶
func SplitStringToMap ¶
func ValidateName ¶
func VolumeStackName ¶
func WaitForDevice ¶
WaitForDevice timeout in second
Types ¶
Click to show internal directories.
Click to hide internal directories.