utils

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MinProgressDelta = 5

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(source string, dest string) error

func FindAndRemoveElementFromStringList

func FindAndRemoveElementFromStringList(s []string, r string) []string

func GetFileContentFromIgnition

func GetFileContentFromIgnition(ignitionData []byte, fileName string) ([]byte, error)

func GetListOfFilesFromFolder

func GetListOfFilesFromFolder(root, pattern string) ([]string, error)

func GetMCOByOpenshiftVersion

func GetMCOByOpenshiftVersion(openshiftVersion string) (string, error)

func GetRhcosImageByOpenshiftVersion

func GetRhcosImageByOpenshiftVersion(openshiftVersion string) (string, error)

func InitLogger

func InitLogger(verbose bool) *logrus.Logger

func IsOpenshiftVersionIsSupported

func IsOpenshiftVersionIsSupported(openshiftVersion string) bool

func Retry

func Retry(attempts int, sleep time.Duration, log *logrus.Logger, f func() error) (err error)

Types

type CoreosInstallerLogWriter added in v1.0.1

type CoreosInstallerLogWriter struct {
	// contains filtered or unexported fields
}

func NewCoreosInstallerLogWriter added in v1.0.1

func NewCoreosInstallerLogWriter(logger *logrus.Logger, progressReporter inventory_client.InventoryClient, hostID string) *CoreosInstallerLogWriter

func (*CoreosInstallerLogWriter) Write added in v1.0.1

func (l *CoreosInstallerLogWriter) Write(p []byte) (n int, err error)

type LogWriter

type LogWriter struct {
	// contains filtered or unexported fields
}

func NewLogWriter

func NewLogWriter(logger *logrus.Logger) *LogWriter

func (*LogWriter) Write

func (l *LogWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL