Documentation ¶
Index ¶
- Variables
- func Authenticate(pc **gophercloud.ProviderClient, service string, config map[string]string, ...) error
- func CompareMicroversions(operator, want, have string) (bool, error)
- func DurationToSeconds(str string) (int, error)
- func EnsureDeleted(deleteFunc, checkFunc, resetFunc func() error, timeout int, delay int) error
- func GetConf(config map[string]string, key, fallback string) string
- func GetEnv(key, fallback string) string
- func Merge(args ...map[string]string) map[string]string
- func ReplaceAccount(account, path string, prefixes []string) string
- func SliceContains[T comparable](elems []T, e T) bool
- func WaitForStatus(statuses []string, timeout int, checkFunc func() (string, error)) error
- type ErrStatus
Constants ¶
This section is empty.
Variables ¶
var ( // Version is the current version of Velero, set by the go linker's -X flag at build time. Version string // GitSHA is the actual commit that is being built, set by the go linker's -X flag at build time. GitSHA string )
Functions ¶
func Authenticate ¶
func Authenticate(pc **gophercloud.ProviderClient, service string, config map[string]string, log logrus.FieldLogger) error
Authenticate to OpenStack and write client result to **pc
func CompareMicroversions ¶
CompareMicroversions compares two microversions using operators: lte: less than or equal gte: greater than or equal
func DurationToSeconds ¶
DurationToSeconds parses the string into a time.Duration format and returns seconds in int format
func EnsureDeleted ¶
EnsureDeleted ensures that the resource is deleted, resets the resource status if it's in error state and tries again until the timeout
func GetEnv ¶
GetEnv gets value from environment variable or fallbacks to default value This snippet is from https://stackoverflow.com/a/40326580/3323419
func Merge ¶
Merge merges maps. If more than one given map with the same key, then the one that is later in the argument sequence takes precedence
func ReplaceAccount ¶
ReplaceAccount replaces an endpoint account part with a new account value
func SliceContains ¶
func SliceContains[T comparable](elems []T, e T) bool
SliceContains checks whether a slice of comparable type contains an element