Documentation ¶
Index ¶
- type Generator
- func (g *Generator) AddLinuxGIDMapping(host, container, size uint32)
- func (g *Generator) AddLinuxUIDMapping(host, container, size uint32)
- func (g *Generator) AddMount(mnt specs.Mount)
- func (g *Generator) AddOrReplaceLinuxNamespace(ns specs.LinuxNamespaceType, path string)
- func (g *Generator) AddProcessEnv(env, value string)
- func (g *Generator) AddProcessRlimits(rType string, rHard uint64, rSoft uint64)
- func (g *Generator) RemoveProcessEnv(env string)
- func (g *Generator) Save(w io.Writer) (err error)
- func (g *Generator) SaveToFile(path string) error
- func (g *Generator) SetProcessApparmorProfile(prof string)
- func (g *Generator) SetProcessArgs(args []string)
- func (g *Generator) SetProcessCwd(cwd string)
- func (g *Generator) SetProcessNoNewPrivileges(b bool)
- func (g *Generator) SetProcessSelinuxLabel(label string)
- func (g *Generator) SetProcessTerminal(b bool)
- func (g *Generator) SetRootPath(path string)
- func (g *Generator) SetupPrivileged(privileged bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
Config *specs.Spec
}
Generator represents a generator for a OCI runtime config.
func New ¶
func New(spec *specs.Spec) *Generator
New returns a generator associated to the OCI specification passed in parameter or an empty OCI specification if parameter is nil.
func (*Generator) AddLinuxGIDMapping ¶
AddLinuxGIDMapping adds a GID mapping.
func (*Generator) AddLinuxUIDMapping ¶
AddLinuxUIDMapping adds a UID mapping.
func (*Generator) AddMount ¶
func (g *Generator) AddMount(mnt specs.Mount)
AddMount adds a mount for container environment setup.
func (*Generator) AddOrReplaceLinuxNamespace ¶
AddOrReplaceLinuxNamespace adds or updates a container process namespace.
func (*Generator) AddProcessEnv ¶
AddProcessEnv adds or replaces a container process environment variable.
func (*Generator) AddProcessRlimits ¶
AddProcessRlimits adds a container process rlimit.
func (*Generator) RemoveProcessEnv ¶
RemoveProcessEnv removes a container process environment variable.
func (*Generator) SaveToFile ¶
SaveToFile writes the configuration into a file.
func (*Generator) SetProcessApparmorProfile ¶
SetProcessApparmorProfile sets container process AppArmor profile.
func (*Generator) SetProcessArgs ¶
SetProcessArgs sets container process arguments.
func (*Generator) SetProcessCwd ¶
SetProcessCwd sets container process working directory.
func (*Generator) SetProcessNoNewPrivileges ¶
SetProcessNoNewPrivileges sets g.Config.Process.NoNewPrivileges.
func (*Generator) SetProcessSelinuxLabel ¶
SetProcessSelinuxLabel sets container process SELinux execution label.
func (*Generator) SetProcessTerminal ¶
SetProcessTerminal sets if container process terminal or not.
func (*Generator) SetRootPath ¶
SetRootPath sets container root filesystem path.
func (*Generator) SetupPrivileged ¶
SetupPrivileged sets requirements for a container process with all privileges.