package common

import "github.com/rootless-containers/rootlesskit/pkg/common"

Index

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

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

type Message0 struct {
}

Message0 is sent after setting up idmap

type Message1

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

type PortMessage struct {
	Opaque map[string]string
}

Source Files

common.go exec.go message.go

Version
v1.1.1 (latest)
Published
May 30, 2023
Platform
linux/amd64
Imports
5 packages
Last checked
3 weeks ago

Tools for package owners.