Documentation
¶
Index ¶
- func CreateIntermediateDirsForFile(ctx context.Context, filePath string)
- func EnsureRuntimeDependenciesInstalled(ctx context.Context)
- func ExecuteCommand(command string) (output string, err error)
- func ExecuteCommandOrDie(command string) string
- func GetClusterDir() string
- func GetDownloadedStorageBucketContentsDir(bucketName string) string
- func GetKubeAidConfigDir() string
- func GetKubeAidDir() string
- func GetParentDirPath(filePath string) string
- func InitTempDir(ctx context.Context)
- func MustGetEnv(name string) string
- func MustSetEnv(name, value string)
- func ToAbsolutePath(ctx context.Context, relativePath string) string
- func WithRetry(delay time.Duration, attempts uint8, fn func() error) error
- func WrapError(contextualErrorMessage string, err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIntermediateDirsForFile ¶
Creates intermediate directories which don't exist for the given file path.
func EnsureRuntimeDependenciesInstalled ¶ added in v0.12.0
Determines the runtime dependencies required by KubeAid Bootstrap Script, based on the cloud-provider being used. Panics if any of them are not found in PATH.
func ExecuteCommand ¶
Executes the given command. The command output is streamed to the standard output.
func ExecuteCommandOrDie ¶
Executes the given command. Panics if the command execution fails.
func GetClusterDir ¶
func GetClusterDir() string
Returns path to the directory containing cluster specific config, in the KubeAid Config dir.
func GetDownloadedStorageBucketContentsDir ¶
Returns the path to the local temp directory, where contents of the given blob storage bucket will be / is downloaded.
func GetKubeAidConfigDir ¶
func GetKubeAidConfigDir() string
Returns path to the directory (in temp directory), where the customer's KubeAid Config repo is / will be cloned.
func GetKubeAidDir ¶
func GetKubeAidDir() string
Returns path to the directory (in temp directory), where the KubeAid repo is / will be cloned.
func GetParentDirPath ¶
Returns path to the parent dir of the given file.
func InitTempDir ¶
Creates a temp dir inside /tmp, where KubeAid Bootstrap Script will clone repos. Then sets the value of constants.TempDir as the temp dir path. If the temp dir already exists, then that gets reused.
func MustGetEnv ¶ added in v0.12.0
Returns value of the given environment variable. Panics if the environment variable isn't found.
func MustSetEnv ¶ added in v0.8.0
func MustSetEnv(name, value string)
Sets value of the given environment variable. Panics on error.
func ToAbsolutePath ¶ added in v0.8.0
Converts the given relative path to an absolute path.
Types ¶
This section is empty.