Documentation ¶
Index ¶
- func Backoff(baseDelay, maxDelay time.Duration, retries int) time.Duration
- func CheckPodsRunning(n string) (ready bool)
- func Compare(out, model []byte) error
- func CompareFiles(outFile, modelFile string) error
- func CompareToFile(out []byte, modelFile string) error
- func CopyFile(src, dst string) error
- func CreateNamespace(n string) error
- func CreateTempfile(tmpDir, prefix, suffix string) (string, error)
- func DeleteNamespace(n string) error
- func Fill(outFile, inFile string, values interface{}) error
- func GetIngress(n string) (string, error)
- func GetIngressPod(n string) (string, error)
- func GetPodStatus(n, pod string) string
- func GetPodsName(n string) (pods []string)
- func GetResourcePath(p string) string
- func HTTPDownload(dst string, src string) error
- func IsProcessRunning(p *os.Process) (bool, error)
- func IsProcessRunningInt(pid int) (bool, error)
- func IsProcessRunningString(pidS string) (bool, error)
- func KillProcess(p *os.Process) (err error)
- func KubeApply(namespace, yamlFileName string) error
- func KubeApplyContents(namespace, yamlContents string) error
- func KubeDelete(namespace, yamlFileName string) error
- func KubeDeleteContents(namespace, yamlContents string) error
- func NamespaceDeleted(n string) (bool, error)
- func ReadJSON(jsonPath string, i interface{}) error
- func Record(command, record string) error
- func RunBackground(format string, args ...interface{}) (*os.Process, error)
- func Shell(format string, args ...interface{}) (string, error)
- func ShellMuteOutput(format string, args ...interface{}) (string, error)
- func WriteTempfile(tmpDir, prefix, suffix, contents string) (string, error)
- type Break
- type LuaTemplate
- type Retrier
- type Wrk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Backoff ¶
Backoff returns a random value in [0, maxDelay] that increases exponentially with retries, starting from baseDelay. It is the Go equivalent to C++'s //util/time/backoff.cc.
func CheckPodsRunning ¶
CheckPodsRunning return if all pods in a namespace are in "Running" status
func Compare ¶
Compare compares two byte slices. It returns an error with a contextual diff if they are not equal.
func CompareFiles ¶
CompareFiles compares the content of two files
func CompareToFile ¶
CompareToFile compares a content with a file
func CreateNamespace ¶
CreateNamespace create a kubernetes namespace
func CreateTempfile ¶
CreateTempfile creates a tempfile string.
func DeleteNamespace ¶
DeleteNamespace delete a kubernetes namespace
func GetIngressPod ¶
GetIngressPod get istio ingress ip
func GetPodStatus ¶
GetPodStatus gets status of a pod from a namespace
func GetPodsName ¶
GetPodsName gets names of all pods in specific namespace and return in a slice
func GetResourcePath ¶
GetResourcePath give "path from WORKSPACE", return absolute path at runtime
func HTTPDownload ¶
HTTPDownload download from src(url) and store into dst(local file)
func IsProcessRunning ¶
IsProcessRunning check if a os.Process is running
func IsProcessRunningInt ¶
IsProcessRunningInt check if a process of the given pid(int) is running
func IsProcessRunningString ¶
IsProcessRunningString check if a process of the given pid(string) is running
func KubeApplyContents ¶
KubeApplyContents kubectl apply from contents
func KubeDelete ¶
KubeDelete kubectl delete from file
func KubeDeleteContents ¶
KubeDeleteContents kubectl apply from contents
func NamespaceDeleted ¶
NamespaceDeleted check if a kubernete namespace is deleted
func RunBackground ¶
RunBackground starts a background process and return the Process if succeed
func ShellMuteOutput ¶
ShellMuteOutput run command on shell and get back output and error if get one without logging the output
func WriteTempfile ¶
WriteTempfile creates a tempfile with the specified contents.
Types ¶
type Break ¶
type Break struct {
Err error
}
Break the retry loop if the error returned is of this type.
type LuaTemplate ¶
LuaTemplate defines a Lua template or script.
func (*LuaTemplate) Generate ¶
func (l *LuaTemplate) Generate() error
Generate creates the lua scripts in the .Script destination from the .Template.
type Retrier ¶
type Retrier struct { // BaseDelay is the minimum delay between retry attempts. BaseDelay time.Duration // MaxDelay is the maximum delay allowed between retry attempts. MaxDelay time.Duration // Retries defines number of retry attempts Retries int }
Retrier contains the retry configuration parameters.