util

package
v1.99.4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFilesToTestDir

func CopyFilesToTestDir() error

func CopyResourcesFromPath

func CopyResourcesFromPath(resourcesPath string) error

func DownloadBundle

func DownloadBundle(bundleLocation string, bundleDestination string, bundleName string) (string, error)

Download bundle for testing

func GetRetryParametersFromTimeoutInSeconds

func GetRetryParametersFromTimeoutInSeconds(iterations, timeout int) (time.Duration, time.Duration, error)

Based on the number of iterations for a given timeout in seconds the function returns the duration of echa loop and the extra time in case required to complete the timeout

func MatchWithRetry added in v1.34.0

func MatchWithRetry(expression string, match func(string) error, retryCount, timeout int) error

func RemoveCRCHome

func RemoveCRCHome(crcHome string) error

func RunDiagnose

func RunDiagnose(dir string) error

Types

type Collector

type Collector interface {
	Collect(Writer) error
}

type CommandCollector

type CommandCollector struct {
	Command, Target string
}

func (*CommandCollector) Collect

func (collector *CommandCollector) Collect(w Writer) error

type ContainerLogCollector

type ContainerLogCollector struct {
	Process string
}

func (*ContainerLogCollector) Collect

func (collector *ContainerLogCollector) Collect(w Writer) error

type FileCollector

type FileCollector struct {
	Source, Target string
}

func (*FileCollector) Collect

func (collector *FileCollector) Collect(w Writer) error

type FileWriter

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

func (*FileWriter) Write

func (fw *FileWriter) Write(filename string, bin []byte) error

type TreeCollector

type TreeCollector struct {
	Dir    string
	Target string
}

func (*TreeCollector) Collect

func (collector *TreeCollector) Collect(w Writer) error

type VMCommandCollector

type VMCommandCollector struct {
	Command, Target string
}

func (*VMCommandCollector) Collect

func (collector *VMCommandCollector) Collect(w Writer) error

type Writer

type Writer interface {
	Write(filename string, bin []byte) error
}

Jump to

Keyboard shortcuts

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