Documentation ¶
Index ¶
- type BPFProgramAttachType
- type BPFProgramType
- type BindPolicy
- type DevicePolicyType
- type KillModeType
- type ManagedOOMPreferenceMode
- type MemoryPressureWatchMode
- type OOMPolicyType
- type Property
- func AllowedCPUs(mask uint64) Property
- func AllowedMemoryNodes(mask uint64) Property
- func BPFProgram(programs ...BPFProgramType) Property
- func CPUAccounting(enable bool) Property
- func CPUQuota(quota float32) Property
- func CPUQuotaPeriod(period time.Duration) Property
- func CPUWeight(weight uint64) Property
- func CoredumpReceive(enable bool) Property
- func DefaultStartupMemoryLow(bytes uint64) Property
- func Delegate(enable bool) Property
- func DelegateSubgroup(group string) Property
- func DevicePolicy(policy DevicePolicyType) Property
- func DisableControllers(controllers ...string) Property
- func FinalKillSignal(signal int) Property
- func Group(group string) Property
- func IOAccounting(enable bool) Property
- func IOWeight(weight uint64) Property
- func IPAccounting(enable bool) Property
- func IPAddressAllow(prefixes ...net.IPNet) Property
- func IPAddressDeny(prefixes ...net.IPNet) Property
- func IPEgressFilterPath(paths ...string) Property
- func IPIngressFilterPath(paths ...string) Property
- func KillMode(typ KillModeType) Property
- func KillSignal(signal int) Property
- func ManagedOOMPreference(mode ManagedOOMPreferenceMode) Property
- func MemoryAccounting(enable bool) Property
- func MemoryHigh(bytes uint64) Property
- func MemoryLow(bytes uint64) Property
- func MemoryMax(bytes uint64) Property
- func MemoryMin(bytes uint64) Property
- func MemoryPressureThreshold(d time.Duration) Property
- func MemoryPressureWatch(mode MemoryPressureWatchMode) Property
- func MemorySwapMax(bytes uint64) Property
- func MemoryZSwapMax(bytes uint64) Property
- func MemoryZSwapWriteback(enable bool) Property
- func OOMPolicy(policy OOMPolicyType) Property
- func PIDFDs(fds []int) Property
- func PIDs(pids ...uint32) Property
- func RestartKillSignal(signal int) Property
- func RestrictNetworkInterfaces(allow bool, intfs ...string) Property
- func RuntimeMax(period time.Duration) Property
- func RuntimeRandomizedExtra(period time.Duration) Property
- func SendSIGHUP(enable bool) Property
- func SendSIGKILL(enable bool) Property
- func Slice(slice string) Property
- func SocketBindAllow(policies ...BindPolicy) Property
- func SocketBindDeny(policies ...BindPolicy) Property
- func StartupAllowedCPUs(mask uint64) Property
- func StartupAllowedMemoryNodes(mask uint64) Property
- func StartupCPUWeight(weight uint64) Property
- func StartupIOWeight(weight uint64) Property
- func StartupMemoryHigh(bytes uint64) Property
- func StartupMemoryLow(bytes uint64) Property
- func StartupMemoryMax(bytes uint64) Property
- func StartupMemorySwapMax(bytes uint64) Property
- func StartupMemoryZSwapMax(bytes uint64) Property
- func TasksAccounting(enable bool) Property
- func TasksMax(maximum uint64) Property
- func TimeoutStop(period time.Duration) Property
- func User(user string) Property
- func WatchdogSignal(signal int) Property
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BPFProgramAttachType ¶
type BPFProgramAttachType string
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 DevicePolicyType ¶
type DevicePolicyType string
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
const ( ManagedOOMPreferenceNone ManagedOOMPreferenceMode = "none" ManagedOOMPreferenceAvoid ManagedOOMPreferenceMode = "avoid" ManagedOOMPreferenceOmit ManagedOOMPreferenceMode = "omit" )
type MemoryPressureWatchMode ¶
type MemoryPressureWatchMode string
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 ¶
Property is configuring a systemd CGroup resource control property
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html See implementation:
- https://github.com/systemd/systemd/blob/e127c66985b9e338fcb79900a88a24848d5d31fb/src/core/dbus-cgroup.c
- https://github.com/systemd/systemd/blob/e127c66985b9e338fcb79900a88a24848d5d31fb/src/core/dbus-scope.c
- https://github.com/systemd/systemd/blob/e127c66985b9e338fcb79900a88a24848d5d31fb/src/core/dbus-slice.c
func AllowedCPUs ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#AllowedCPUs=
func AllowedMemoryNodes ¶
func BPFProgram ¶
func BPFProgram(programs ...BPFProgramType) Property
func CPUAccounting ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#CPUAccounting=
func CPUQuota ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#CPUQuota=
func CPUQuotaPeriod ¶
func CoredumpReceive ¶
func DefaultStartupMemoryLow ¶
func Delegate ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#Delegate=
func DelegateSubgroup ¶
func DevicePolicy ¶
func DevicePolicy(policy DevicePolicyType) Property
func DisableControllers ¶
func FinalKillSignal ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html#FinalKillSignal=
func IOAccounting ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#IOAccounting=
func IPAccounting ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#IPAccounting=
func IPAddressAllow ¶
func IPAddressDeny ¶
func IPEgressFilterPath ¶
func IPIngressFilterPath ¶
func KillMode ¶
func KillMode(typ KillModeType) Property
func KillSignal ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html#KillSignal=
func ManagedOOMPreference ¶
func ManagedOOMPreference(mode ManagedOOMPreferenceMode) Property
func MemoryAccounting ¶
func MemoryHigh ¶
func MemoryPressureThreshold ¶
func MemoryPressureWatch ¶
func MemoryPressureWatch(mode MemoryPressureWatchMode) Property
func MemorySwapMax ¶
func MemoryZSwapMax ¶
func MemoryZSwapWriteback ¶
func OOMPolicy ¶
func OOMPolicy(policy OOMPolicyType) Property
func RestartKillSignal ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html#RestartKillSignal=
func RuntimeMax ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#RuntimeMaxSec=
func RuntimeRandomizedExtra ¶
func SendSIGHUP ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html#SendSIGHUP=
func SendSIGKILL ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html#SendSIGKILL=
func Slice ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#Slice= TODO: Implement
func SocketBindAllow ¶
func SocketBindAllow(policies ...BindPolicy) Property
func SocketBindDeny ¶
func SocketBindDeny(policies ...BindPolicy) Property
func StartupAllowedCPUs ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#AllowedCPUs=
func StartupCPUWeight ¶
func StartupIOWeight ¶
func StartupMemoryHigh ¶
func StartupMemoryLow ¶
func StartupMemoryMax ¶
func StartupMemorySwapMax ¶
func StartupMemoryZSwapMax ¶
func TasksAccounting ¶
func TasksMax ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html#TasksMax=N
func TimeoutStop ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#TimeoutStopSec=
func WatchdogSignal ¶
See: https://www.freedesktop.org/software/systemd/man/latest/systemd.kill.html#WatchdogSignal=