common

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execs

func Execs(o io.Writer, env []string, cmds [][]string) error

func GetExecExitStatus

func GetExecExitStatus(err error) (int, bool)

func Seq

func Seq(fns []func() error) func() error

Types

type ErrorWithSys added in v0.13.0

type ErrorWithSys interface {
	error
	Sys() interface{}
}

ErrorWithSys is implemented by *exec.ExitError and *child.reaperErr

type Message

type Message struct {
	Stage int // 0 for Message 0, 1 for Message 1
	Message0
	Message1
}

Message is sent from the parent to the child as JSON, with uint32le length header.

type Message0 added in v0.4.0

type Message0 struct {
}

Message0 is sent after setting up idmap

type Message1 added in v0.4.0

type Message1 struct {
	// StateDir cannot be empty
	StateDir string
	Network  NetworkMessage
	Port     PortMessage
}

Message 1 is sent after setting up other stuff

type NetworkMessage

type NetworkMessage struct {
	Dev     string
	IP      string
	Netmask int
	Gateway string
	DNS     string
	MTU     int
	// Opaque strings are specific to driver
	Opaque map[string]string
}

NetworkMessage is empty for HostNetwork.

type PortMessage added in v0.3.0

type PortMessage struct {
	Opaque map[string]string
}

Jump to

Keyboard shortcuts

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