oci

package
v0.0.0-...-c3fcc58 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CapStrToVal

func CapStrToVal(cap string) (capability.Cap, error)

func ParseENVStr

func ParseENVStr(envvar string) (res map[string]string, err error)

func SetCWD

func SetCWD(conf Config) error

func SetCaps

func SetCaps(conf Config) error

func SetRLimits

func SetRLimits(conf Config) error

func SetUser

func SetUser(conf Config) *syscall.Credential

func SetupEnv

func SetupEnv(conf Config) error

func SetupFS

func SetupFS(conf Config) error

func SetupNamespaces

func SetupNamespaces(conf Config) (uintptr, error)

Types

type Config

type Config interface {
	GetRoot() rootfs
	GetMounts() []mount
	GetProcess() process
	GetHostName() string
	GetPlatorm() platform
	GetOS() OS
	GetHooks() hooks
	SetCaps() error
	SetupNamespaces() (uintptr, error)
}

func LoadConfig

func LoadConfig(path string) (Config, error)

type Hook

type Hook struct {
	Path    string   `json:"path"`
	Args    []string `json:"args"`
	Env     []string `json:"env"`
	Timeout int      `json:"timeout"`
}

type Namespace

type Namespace struct {
	Type string `json:"type"`
	Path string `json:"path",omitempty`
}

type OS

type OS interface {
	GetDevices() []device
	GetNamespaces() []Namespace
}

Jump to

Keyboard shortcuts

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