Documentation
¶
Index ¶
- func CreateIntermediateDirsForFile(ctx context.Context, filePath string)
- func EnsureRuntimeDependenciesInstalled(ctx context.Context)
- func EnsureRuntimeDependencyInstalled(ctx context.Context, name string)
- func ExecuteCommand(command string) (string, error)
- func ExecuteCommandOrDie(command string) string
- func GetClusterDir() string
- func GetDownloadedStorageBucketContentsDir(bucketName string) string
- func GetParentDirPath(filePath string) string
- func InitKnownHostsDir(ctx context.Context)
- func InitTempDir(ctx context.Context)
- func MustGetEnv(name string) string
- func MustMoveFile(ctx context.Context, sourceFilePath, destinationFilePath 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 EnsureRuntimeDependencyInstalled ¶ added in v0.12.2
Panics if the given runtime dependency / executable isn't 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 GetParentDirPath ¶
Returns path to the parent dir of the given file.
func InitKnownHostsDir ¶ added in v0.15.2
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 MustMoveFile ¶ added in v0.12.1
Moves the source file to the destination file.
But unlike os.Rename( ), it doesn't error out when the source and destination files are present on different drives.
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.