cgroup

package
v2.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BPFProgramAttachType

type BPFProgramAttachType string

See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#BPFProgram=type:program-path

const (
	BPFAttachTypeIngress    BPFProgramAttachType = "ingress"
	BPFAttachTypeEgress     BPFProgramAttachType = "egress"
	BPFAttachTypeSockCreate BPFProgramAttachType = "sock_create"
	BPFAttachTypeSockOps    BPFProgramAttachType = "sock_ops"
	BPFAttachTypeDevice     BPFProgramAttachType = "device"
	BPFAttachTypeBind4      BPFProgramAttachType = "bind4"
	BPFAttachTypeBind6      BPFProgramAttachType = "bind6"
	BPFAttachTypeConnect4   BPFProgramAttachType = "connect4"
	BPFAttachTypeConnect6   BPFProgramAttachType = "connect6"
	BPFAttachTypePostBind4  BPFProgramAttachType = "post_bind4"
	BPFAttachTypePostBind6  BPFProgramAttachType = "post_bind6"
	BPFAttachTypeSendmsg4   BPFProgramAttachType = "sendmsg4"
	BPFAttachTypeSendmsg6   BPFProgramAttachType = "sendmsg6"
	BPFAttachTypeSysctl     BPFProgramAttachType = "sysctl"
	BPFAttachTypeRecvmsg4   BPFProgramAttachType = "recvmsg4"
	BPFAttachTypeRecvmsg6   BPFProgramAttachType = "recvmsg6"
	BPFAttachTypeGetsockopt BPFProgramAttachType = "getsockopt"
	BPFAttachTypeSetsockopt BPFProgramAttachType = "setsockopt"
)

type BPFProgramType

type BPFProgramType struct {
	AttachType BPFProgramAttachType `dbus:"-"`
	Path       string               `dbus:"-"`
}

type BindPolicy

type BindPolicy struct {
	// Network family. Must be one of "tcp4", "tcp6", "udp4", "udp6"
	Network string
	PortMin uint16
	PortMax uint16
}

type DevicePolicyType

type DevicePolicyType string

See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#DevicePolicy=auto%7Cclosed%7Cstrict

const (
	DevicePolicyAuto   DevicePolicyType = "auto"
	DevicePolicyClosed DevicePolicyType = "closed"
	DevicePolicyStrict DevicePolicyType = "strict"
)

type KillModeType

type KillModeType string

See: https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html#KillMode=

const (
	KillModeControlGroup KillModeType = "control-group"
	KillModeProcess      KillModeType = "process"
	KillModeMixed        KillModeType = "mixed"
	KillModeNonde        KillModeType = "none"
)

type ManagedOOMPreferenceMode

type ManagedOOMPreferenceMode string

See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#ManagedOOMPreference=none%7Cavoid%7Comit

const (
	ManagedOOMPreferenceNone  ManagedOOMPreferenceMode = "none"
	ManagedOOMPreferenceAvoid ManagedOOMPreferenceMode = "avoid"
	ManagedOOMPreferenceOmit  ManagedOOMPreferenceMode = "omit"
)

type MemoryPressureWatchMode

type MemoryPressureWatchMode string

See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#MemoryPressureWatch=

const (
	MemoryPressureWatchOff  MemoryPressureWatchMode = "off"
	MemoryPressureWatchOn   MemoryPressureWatchMode = "on"
	MemoryPressureWatchSkip MemoryPressureWatchMode = "skip"
)

type OOMPolicyType

type OOMPolicyType string

See: https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#OOMPolicy=

const (
	OOMPolicyContinue OOMPolicyType = "continue"
	OOMPolicyStop     OOMPolicyType = "stop"
	OOMPolicyKill     OOMPolicyType = "kill"
)

type Property

type Property sdbus.Property

Property is configuring a systemd CGroup resource control property

See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html See implementation:

func BPFProgram

func BPFProgram(programs ...BPFProgramType) Property

func DevicePolicy

func DevicePolicy(policy DevicePolicyType) Property

func Group

func Group(group string) Property

func KillMode

func KillMode(typ KillModeType) Property

func ManagedOOMPreference

func ManagedOOMPreference(mode ManagedOOMPreferenceMode) Property

func MemoryPressureWatch

func MemoryPressureWatch(mode MemoryPressureWatchMode) Property

func OOMPolicy

func OOMPolicy(policy OOMPolicyType) Property

func PIDFDs

func PIDFDs(fds []int) Property

func PIDs

func PIDs(pids ...uint32) Property

func User

func User(user string) Property

func (Property) ApplyCGroup

func (p Property) ApplyCGroup(g *g.CGroup)

Jump to

Keyboard shortcuts

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