starter

package
v3.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 2, 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) GetBringLoopbackInterface

func (c *Config) GetBringLoopbackInterface() bool

GetBringLoopbackInterface returns if starter bring loopback network interface

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) GetJSONConfig

func (c *Config) GetJSONConfig() []byte

GetJSONConfig returns pointer to JSON configuration

func (*Config) GetJoinMount

func (c *Config) GetJoinMount() bool

GetJoinMount returns if container process join a mount namespace

func (*Config) GetNoNewPrivs

func (c *Config) GetNoNewPrivs() bool

GetNoNewPrivs returns if NO_NEW_PRIVS flag is set or not

func (*Config) GetSharedMount

func (c *Config) GetSharedMount() bool

GetSharedMount returns if master/container shares mount point or not

func (*Config) Release

func (c *Config) Release() error

Release performs a unmap on starter config and release mapped memory

func (*Config) SetBringLoopbackInterface

func (c *Config) SetBringLoopbackInterface(bring bool)

SetBringLoopbackInterface sets if starter bring loopback network interface

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) SetJoinMount

func (c *Config) SetJoinMount(join bool)

SetJoinMount sets if container process join a mount namespace

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) error

SetNsPath sets corresponding namespace to be joined

func (*Config) SetNsPathFromSpec

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

SetNsPathFromSpec sets corresponding namespace to be joined from OCI spec

func (*Config) SetSharedMount

func (c *Config) SetSharedMount(shared bool)

SetSharedMount sets if master/container shares mount point

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) Write

func (c *Config) Write(payload interface{}) error

WriteConfig writes raw C configuration

Jump to

Keyboard shortcuts

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