starter

package
v3.0.3-rc2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CConfig

type CConfig *C.struct_cConfig

CConfig is the common type for C.struct_cConfig

type Config

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

Config represents structure to manipulate C starter configuration

func NewConfig

func NewConfig(config CConfig) *Config

NewConfig takes a pointer to C starter configuration and returns a pointer to a Config

func (*Config) AddGIDMappings

func (c *Config) AddGIDMappings(gids []specs.LinuxIDMapping) error

AddGIDMappings sets user namespace GID mapping

func (*Config) AddUIDMappings

func (c *Config) AddUIDMappings(uids []specs.LinuxIDMapping) error

AddUIDMappings sets user namespace UID mapping.

func (*Config) GetContainerPid

func (c *Config) GetContainerPid() int

GetContainerPid returns container process ID

func (*Config) GetInstance

func (c *Config) GetInstance() bool

GetInstance returns if container run as instance or not

func (*Config) GetIsSUID

func (c *Config) GetIsSUID() bool

GetIsSUID returns if SUID workflow is enabled or not

func (*Config) GetJSONConfSize

func (c *Config) GetJSONConfSize() uint

GetJSONConfSize returns size of JSON configuration sent by starter

func (*Config) GetNoNewPrivs

func (c *Config) GetNoNewPrivs() bool

GetNoNewPrivs returns if NO_NEW_PRIVS flag is set or not

func (*Config) SetCapabilities

func (c *Config) SetCapabilities(ctype string, caps []string)

SetCapabilities sets corresponding capability set identified by ctype from a capability string list identified by ctype

func (*Config) SetInstance

func (c *Config) SetInstance(instance bool)

SetInstance sets if starter should spawn instance or not

func (*Config) SetMountPropagation

func (c *Config) SetMountPropagation(propagation string)

SetMountPropagation sets root filesystem mount propagation

func (*Config) SetNoNewPrivs

func (c *Config) SetNoNewPrivs(noprivs bool)

SetNoNewPrivs sets NO_NEW_PRIVS flag

func (*Config) SetNsFlags

func (c *Config) SetNsFlags(flags int)

SetNsFlags sets namespaces flag directly from flags argument

func (*Config) SetNsFlagsFromSpec

func (c *Config) SetNsFlagsFromSpec(namespaces []specs.LinuxNamespace)

SetNsFlagsFromSpec sets namespaces flag from OCI spec

func (*Config) SetNsPath

func (c *Config) SetNsPath(nstype specs.LinuxNamespaceType, path string)

SetNsPath sets corresponding namespace to be joined

func (*Config) SetNsPathFromSpec

func (c *Config) SetNsPathFromSpec(namespaces []specs.LinuxNamespace)

SetNsPathFromSpec sets corresponding namespace to be joined from OCI spec

func (*Config) SetTargetGID

func (c *Config) SetTargetGID(gids []int)

SetTargetGID sets target GIDs to execute container process as group IDs

func (*Config) SetTargetUID

func (c *Config) SetTargetUID(uid int)

SetTargetUID sets target UID to execute the container process as user ID

func (*Config) WritePayload

func (c *Config) WritePayload(w io.Writer, payload interface{}) error

WritePayload writes raw C configuration and payload passed in argument to the provided writer

Jump to

Keyboard shortcuts

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