internal

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveVolume

func ArchiveVolume(ctx context.Context, volumeNames []string, targetFile string) error

func ContainerID

func ContainerID() string

func CreateNetworkIfNeeded

func CreateNetworkIfNeeded(ctx context.Context, name string) (string, error)

func CreateVolume

func CreateVolume(ctx context.Context, name string) error

func JoinNetwork

func JoinNetwork(ctx context.Context, containerID string, networkID string) error

func SetFlags

func SetFlags(cmd *exec.Cmd)

Set parent group and death signal to be sure that nested processes will be closed

func StreamingLogger

func StreamingLogger(logger Logger) io.WriteCloser

func ToDomain

func ToDomain(file string) string

func UnArchiveVolume

func UnArchiveVolume(ctx context.Context, volumeNames []string, targetFile string) error

func WithLogger

func WithLogger(ctx context.Context, logger Logger) context.Context

Types

type At

type At string

func In

func In(directory string) At

func (At) Do

func (inv At) Do(ctx context.Context, binary string, args ...string) *Process

type ErrDockerAPI

type ErrDockerAPI struct {
	Message string
}

func (*ErrDockerAPI) Error

func (eda *ErrDockerAPI) Error() string

type Logger

type Logger interface {
	Println(...interface{})
}

func LoggerFromContext

func LoggerFromContext(ctx context.Context) Logger

func Namespaced

func Namespaced(parent Logger, name string) Logger

func SubLogger

func SubLogger(ctx context.Context, name string) Logger

type LoggerFunc

type LoggerFunc func(...interface{})

func (LoggerFunc) Println

func (lf LoggerFunc) Println(vars ...interface{})

type Process

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

func (*Process) Env

func (prc *Process) Env(environ map[string]string) *Process

func (*Process) Exec

func (prc *Process) Exec() error

func (*Process) Output

func (prc *Process) Output() (string, error)

func (*Process) Text

func (prc *Process) Text(data string) *Process

Jump to

Keyboard shortcuts

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