utils

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFiles added in v0.0.7

func GetFiles(path string) (paths []string, err error)

func HTTP added in v0.0.8

func HTTP(address string, header map[string]string) (string, error)

func In added in v0.0.8

func In(key string, slice []string) bool

func InList

func InList(key string, slice []string) bool

func IsExist added in v0.0.7

func IsExist(fileName string) bool

func IsImageId added in v0.0.8

func IsImageId(out, imageId string) bool

crictl images -q

func LoadImages added in v0.0.7

func LoadImages(imageDir string) ([]string, error)

func NormalizeName added in v0.0.8

func NormalizeName(name string) (reference.Named, error)

func NotIn

func NotIn(key string, slice []string) bool

func ReadAll added in v0.0.7

func ReadAll(fileName string) ([]byte, error)

ReadAll read file content

func ReadLines added in v0.0.7

func ReadLines(fileName string) ([]string, error)

func RegistryHasImage added in v0.0.8

func RegistryHasImage(registryAddress, registryBase64Auth, imageName string) bool

func RemoveDuplicate added in v0.0.7

func RemoveDuplicate(list []string) []string

func RunBashCmd added in v0.0.8

func RunBashCmd(cmd string) (string, error)

func ServerActiveAt

func ServerActiveAt(socket string) bool

ServerActiveAt checks if a gRPC server is accepting connections at the socket.

func Unmarshal added in v0.0.7

func Unmarshal(path string) (map[string]interface{}, error)

func WaitForServer

func WaitForServer(socket string, timeout time.Duration, opts ...interface{}) error

WaitForServer waits for a gRPC server to start accepting connections on a socket.

Types

This section is empty.

Jump to

Keyboard shortcuts

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