utils

package
v1.0.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

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 GetHostIpsFromInventory added in v1.0.5

func GetHostIpsFromInventory(inventory *models.Inventory) ([]string, 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, enableJournal 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)

func SetFileInIgnition added in v1.0.5

func SetFileInIgnition(ignitionData []byte, filePath, fileContents string, mode int) ([]byte, error)

Types

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