util

package
v0.19.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerExec

func ContainerExec(ctx context.Context, client docker.CommonAPIClient, container string, config dockertypes.ExecConfig) (io.ReadCloser, io.ReadCloser, <-chan ContainerCmdError, error)

func DemuxLogs

func DemuxLogs(ctx context.Context, source io.Reader, prefix string) (map[string]io.Reader, error)

Given a docker logs stream, return a map of the stdout and stderr components

func FileCount

func FileCount(ctx context.Context, client docker.CommonAPIClient, image string, dirname string, securityOpt []string) (int, error)

func FileExists

func FileExists(ctx context.Context, client docker.CommonAPIClient, image string, filename string, securityOpt []string) (bool, error)

func ReadFile

func ReadFile(ctx context.Context, client docker.CommonAPIClient, image, filename string, securityOpt []string) (io.ReadCloser, error)

func ThisContainer

func ThisContainer(ctx context.Context, client docker.CommonAPIClient) (*dockertypes.ContainerJSON, error)

ThisContainer will find a running container with image containing "support-bundle"

Types

type ContainerCmdError

type ContainerCmdError struct {
	StatusCode int
	Error      error
}

Jump to

Keyboard shortcuts

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