Documentation
¶
Index ¶
- type Generator
- func (g *Generator) AddAnnotation(key, value string)
- func (g *Generator) AddDevice(device rspec.LinuxDevice)
- func (g *Generator) AddLinuxResourcesDevice(allow bool, devType string, major, minor *int64, access string)
- func (g *Generator) AddLinuxResourcesHugepageLimit(pageSize string, limit uint64)
- func (g *Generator) AddLinuxResourcesUnified(key, val string)
- func (g *Generator) AddLinuxSysctl(key, value string)
- func (g *Generator) AddMount(mnt rspec.Mount)
- func (g *Generator) AddOrReplaceLinuxNamespace(ns string, path string) error
- func (g *Generator) AddPostStartHook(hook rspec.Hook)
- func (g *Generator) AddPostStopHook(hook rspec.Hook)
- func (g *Generator) AddPreStartHook(hook rspec.Hook)
- func (g *Generator) AddProcessEnv(name, value string)
- func (g *Generator) ClearMounts()
- func (g *Generator) ClearProcessEnv()
- func (g *Generator) Mounts() []rspec.Mount
- func (g *Generator) RemoveAnnotation(key string)
- func (g *Generator) RemoveDevice(path string)
- func (g *Generator) RemoveLinuxNamespace(ns string) error
- func (g *Generator) RemoveLinuxSysctl(key string)
- func (g *Generator) RemoveMount(dest string)
- func (g *Generator) SetLinuxCgroupsPath(path string)
- func (g *Generator) SetLinuxResourcesCPUCpus(cpus string)
- func (g *Generator) SetLinuxResourcesCPUMems(mems string)
- func (g *Generator) SetLinuxResourcesCPUPeriod(period uint64)
- func (g *Generator) SetLinuxResourcesCPUQuota(quota int64)
- func (g *Generator) SetLinuxResourcesCPURealtimePeriod(period uint64)
- func (g *Generator) SetLinuxResourcesCPURealtimeRuntime(time int64)
- func (g *Generator) SetLinuxResourcesCPUShares(shares uint64)
- func (g *Generator) SetLinuxResourcesMemoryLimit(limit int64)
- func (g *Generator) SetLinuxResourcesMemorySwap(swap int64)
- func (g *Generator) SetLinuxRootPropagation(rp string) error
- func (g *Generator) SetProcessArgs(args []string)
- func (g *Generator) SetProcessOOMScoreAdj(adj int)
- func (g *Generator) Spec() *rspec.Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator implements [generate.UnderlyingGenerator] directly on an *rspec.Spec, removing the need to import github.com/opencontainers/runtime-tools/generate.
func (*Generator) AddAnnotation ¶
AddAnnotation adds or replaces an annotation in the specification.
func (*Generator) AddDevice ¶
func (g *Generator) AddDevice(device rspec.LinuxDevice)
AddDevice adds a Linux device to the specification.
func (*Generator) AddLinuxResourcesDevice ¶
func (g *Generator) AddLinuxResourcesDevice(allow bool, devType string, major, minor *int64, access string)
AddLinuxResourcesDevice adds a Linux device cgroup rule.
func (*Generator) AddLinuxResourcesHugepageLimit ¶
AddLinuxResourcesHugepageLimit adds or replaces a Linux hugepage limit.
func (*Generator) AddLinuxResourcesUnified ¶
AddLinuxResourcesUnified adds or replaces a unified cgroup resource setting.
func (*Generator) AddLinuxSysctl ¶
AddLinuxSysctl adds or replaces a Linux sysctl setting.
func (*Generator) AddOrReplaceLinuxNamespace ¶
AddOrReplaceLinuxNamespace adds or replaces a Linux namespace in the specification.
func (*Generator) AddPostStartHook ¶
AddPostStartHook adds a post-start hook to the specification.
func (*Generator) AddPostStopHook ¶
AddPostStopHook adds a post-stop hook to the specification.
func (*Generator) AddPreStartHook ¶
AddPreStartHook adds a pre-start hook to the specification.
func (*Generator) AddProcessEnv ¶
AddProcessEnv adds or replaces an environment variable for the process.
func (*Generator) ClearMounts ¶
func (g *Generator) ClearMounts()
ClearMounts removes all mounts from the specification.
func (*Generator) ClearProcessEnv ¶
func (g *Generator) ClearProcessEnv()
ClearProcessEnv removes all environment variables from the process.
func (*Generator) RemoveAnnotation ¶
RemoveAnnotation removes an annotation from the specification.
func (*Generator) RemoveDevice ¶
RemoveDevice removes the Linux device with the given path from the specification.
func (*Generator) RemoveLinuxNamespace ¶
RemoveLinuxNamespace removes a Linux namespace from the specification.
func (*Generator) RemoveLinuxSysctl ¶
RemoveLinuxSysctl removes a Linux sysctl setting.
func (*Generator) RemoveMount ¶
RemoveMount removes the mount with the given destination from the specification.
func (*Generator) SetLinuxCgroupsPath ¶
SetLinuxCgroupsPath sets the Linux cgroups path.
func (*Generator) SetLinuxResourcesCPUCpus ¶
SetLinuxResourcesCPUCpus sets the Linux CPUs available to the process.
func (*Generator) SetLinuxResourcesCPUMems ¶
SetLinuxResourcesCPUMems sets the Linux memory nodes available to the process.
func (*Generator) SetLinuxResourcesCPUPeriod ¶
SetLinuxResourcesCPUPeriod sets the Linux CPU period.
func (*Generator) SetLinuxResourcesCPUQuota ¶
SetLinuxResourcesCPUQuota sets the Linux CPU quota.
func (*Generator) SetLinuxResourcesCPURealtimePeriod ¶
SetLinuxResourcesCPURealtimePeriod sets the Linux CPU realtime period.
func (*Generator) SetLinuxResourcesCPURealtimeRuntime ¶
SetLinuxResourcesCPURealtimeRuntime sets the Linux CPU realtime runtime.
func (*Generator) SetLinuxResourcesCPUShares ¶
SetLinuxResourcesCPUShares sets the Linux CPU shares.
func (*Generator) SetLinuxResourcesMemoryLimit ¶
SetLinuxResourcesMemoryLimit sets the Linux memory limit.
func (*Generator) SetLinuxResourcesMemorySwap ¶
SetLinuxResourcesMemorySwap sets the Linux memory swap limit.
func (*Generator) SetLinuxRootPropagation ¶
SetLinuxRootPropagation sets the Linux root filesystem propagation mode.
func (*Generator) SetProcessArgs ¶
SetProcessArgs sets the process arguments.
func (*Generator) SetProcessOOMScoreAdj ¶
SetProcessOOMScoreAdj sets the process OOM score adjustment.