util

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WasmFilterName = "envoy.filters.http.wasm"
)

Variables

This section is empty.

Functions

func Docker added in v0.0.13

func Docker(stdout, stderr io.Writer, stdin io.Reader, args ...string) error

func DockerRun added in v0.0.13

func DockerRun(stdout, stderr io.Writer, stdin io.Reader, image string, runArgs, imageArgs []string) error

func ExecCmd added in v0.0.13

func ExecCmd(stdout, stderr io.Writer, stdin io.Reader, cmd string, args ...string) error

func ExecOutput added in v0.0.13

func ExecOutput(stdin io.Reader, cmd string, args ...string) (string, error)

func MarshalBytes

func MarshalBytes(pb proto.Message) ([]byte, error)

func MarshalStruct

func MarshalStruct(m proto.Message) (*structpb.Struct, error)

func RetryOn500 added in v0.0.15

func RetryOn500(retryable func() error) error

add some retry logic here as some registries can be flaky

func RetryOnFunc added in v0.0.16

func RetryOnFunc(retryable func() error, retryIf func(err error) bool, opts ...retry.Option) error

add some retry logic here as some registries can be flaky

func SplitImageRef

func SplitImageRef(ref string) (string, string, error)

splits a ref into the repo and tag if tag is empty, returns "latest"

func Tar

func Tar(src string, writers ...io.Writer) error

Tar takes a source and variable writers and walks 'source' writing each file found to the tar writer; the purpose for accepting multiple writers is to allow for multiple outputs (for example a file, or md5 hash)

func UnmarshalBytes

func UnmarshalBytes(b []byte, pb proto.Message) error

func UnmarshalStruct

func UnmarshalStruct(s *structpb.Struct, m proto.Message) error

func Untar

func Untar(dst string, r io.Reader) error

Untar takes a destination path and a reader; a tar reader loops over the tarfile creating the file structure at 'dst' along the way, and writing any files

Types

This section is empty.

Jump to

Keyboard shortcuts

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