Documentation ¶
Index ¶
- func BoolToPtr(b bool) *bool
- func CreateSSHAuthorizedKey(tmpd string) ([]byte, string, error)
- func DownloadImageAndDecompress(url, compressedDest string, skipSignature bool) (string, error)
- func GetLocalFastBuildQemu() (string, error)
- func IntToPtr(i int) *int
- func IsCosaRoot(root string) (bool, error)
- func LogFrom(l capnslog.LogLevel, r io.Reader)
- func ParseDiskSpec(spec string) (int64, map[string]string, error)
- func PathExists(path string) (bool, error)
- func RequireCosaRoot(root string) error
- func Retry(attempts int, delay time.Duration, f func() error) error
- func RetryConditional(attempts int, delay time.Duration, shouldRetry func(err error) bool, ...) error
- func RetryUntilTimeout(timeout, delay time.Duration, f func() error) error
- func RunCmdTimeout(timeout time.Duration, cmd string, args ...string) error
- func StrToPtr(s string) *string
- func TargetDistro(build *builds.Build) (string, error)
- func TargetDistroFromName(artifact string) string
- func WaitUntilReady(timeout, delay time.Duration, checkFunction func() (bool, error)) error
- type Endian
- type ImageInfo
- type LocalBuild
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSSHAuthorizedKey ¶
CreateSSHAuthorizedKey generates a public key to sanity check that Ignition accepts it.
func DownloadImageAndDecompress ¶
Note this is a no-op if the decompressed dest already exists.
func GetLocalFastBuildQemu ¶
GetLocalFastBuildQemu finds content written by `cosa build-fast`
func IsCosaRoot ¶
func ParseDiskSpec ¶
ParseDiskSpec converts a disk specification into a Disk. The format is: <size>[:<opt1>,<opt2>,...], like ["5G:channel=nvme"]
func PathExists ¶
func RequireCosaRoot ¶
func Retry ¶
Retry calls function f until it has been called attemps times, or succeeds. Retry delays for delay between calls of f. If f does not succeed after attempts calls, the error from the last call is returned.
func RetryConditional ¶
func RetryConditional(attempts int, delay time.Duration, shouldRetry func(err error) bool, f func() error) error
RetryConditional calls function f until it has been called attemps times, or succeeds. Retry delays for delay between calls of f. If f does not succeed after attempts calls, the error from the last call is returned. If shouldRetry returns false on the error generated, RetryConditional stops immediately and returns the error
func RetryUntilTimeout ¶
RetryUntilTimeout calls function f until it succeeds or until the given timeout is reached. It will wait a given amount of time between each try based on the given delay.
func RunCmdTimeout ¶
RunCmdTimeout runs a command but returns an error if it doesn't complete before the given duration.
func TargetDistro ¶
TargetDistro returns the distribution of a cosa build
func TargetDistroFromName ¶
TargetDistroFromName returns the distribution given the path to an artifact (usually a disk image).
Types ¶
type ImageInfo ¶
func GetImageInfo ¶
type LocalBuild ¶
Build is a parsed coreos-assembler build
func GetLatestLocalBuild ¶
func GetLatestLocalBuild(root, arch string) (*LocalBuild, error)
func GetLocalBuild ¶
func GetLocalBuild(root, buildid, arch string) (*LocalBuild, error)