config

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TypeString string
	TypeInt    int
	TypeUint   uint
)
View Source
var Namespaces []string = []string{"pid", "net", "user", "uts", "ipc", "cgroup", "mnt", "time", "ns"}

Functions

func ConfigFileLoc

func ConfigFileLoc(name string) string

func GenerateContainerId

func GenerateContainerId() string

Types

type ALocFor

type ALocFor uint8

Allocate For a Network Interface {host: bridge interfaces such as sandal0 , host-pod: veth, pod: lo0}

const (
	ALocForHost ALocFor = iota
	ALocForHostPod
	ALocForPod
)

type Config

type Config struct {
	Name string

	Created int64
	HostPid int
	ContPid int
	TmpSize uint

	ProjectDir string

	ChangeDir string
	RootfsDir string

	ReadOnly   bool
	Remove     bool
	EnvAll     bool
	Background bool
	Startup    bool
	NS         map[string]*StringWrapper

	Exec        string
	Devtmpfs    string
	Resolv      string
	Hosts       string
	Status      string
	Dir         string
	Volumes     StringFlags
	SquashFiles []*SquashFile
	HostArgs    []string
	PodArgs     []string
	Lower       StringFlags
	RunPreExec  StringFlags
	RunPrePivot StringFlags
	PassEnv     StringFlags

	Ifaces []NetIface
}

func NewContainer

func NewContainer() Config

func (*Config) ConfigFileLoc

func (c *Config) ConfigFileLoc() string

func (Config) Json

func (c Config) Json() []byte

type DefaultInformation

type DefaultInformation struct {
	ChangeDir string
	RootFsDir string
}

func Defs

func Defs(containerName string) DefaultInformation

type NetIface

type NetIface struct {
	Name    string
	Type    string
	IP      string
	ALocFor ALocFor // host, host-pod (aka veth), pod
	Main    []NetIface
}

type SquashFile

type SquashFile struct {
	File   string
	LoopNo int
}

type StringFlags

type StringFlags []string

func (*StringFlags) Set

func (f *StringFlags) Set(value string) error

func (*StringFlags) String

func (f *StringFlags) String() string

type StringWrapper

type StringWrapper struct {
	Value string
}

Jump to

Keyboard shortcuts

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