Documentation ¶
Index ¶
- func ExecWithLimits(limits *ProcessLimitValues, callback func(string), command string, ...) ([]byte, error)
- func ExecWithLimitsSilently(limits *ProcessLimitValues, callback func(string), command string, ...) ([]byte, error)
- func SetAddressSpaceLimit(pid int, value uint64) error
- func SetCPUTimeLimit(pid int, value uint64) error
- type ProcessLimitValues
- type ProcessLimiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecWithLimits ¶
func ExecWithLimits(limits *ProcessLimitValues, callback func(string), command string, args ...string) ([]byte, error)
ExecWithLimits executes a command with process limits
func ExecWithLimitsSilently ¶ added in v1.16.0
func ExecWithLimitsSilently(limits *ProcessLimitValues, callback func(string), command string, args ...string) ([]byte, error)
ExecWithLimitsSilently executes a command with process limits and do not print output on error
func SetAddressSpaceLimit ¶
SetAddressSpaceLimit sets a limit on total address space of a process
func SetCPUTimeLimit ¶
SetCPUTimeLimit sets a limit on the total cpu time a process may have
Types ¶
type ProcessLimitValues ¶
ProcessLimitValues specifies the resource limits available to a process
type ProcessLimiter ¶
type ProcessLimiter interface { SetAddressSpaceLimit(pid int, value uint64) error SetCPUTimeLimit(pid int, value uint64) error }
ProcessLimiter defines the methods limiting resources of a Process
func NewProcessLimiter ¶
func NewProcessLimiter() ProcessLimiter
NewProcessLimiter returns a new ProcessLimiter
Click to show internal directories.
Click to hide internal directories.