Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter represent memory limiter.
func (*Limiter) Context ¶
Context return new context that cancelled when the total memory usage of processes exceeding the limit.
func (*Limiter) Prepare ¶
Prepare create new cgroup tree inside memory subsystem. When old cgroup with same name already exists, it will be removed. TODO: use memory swap cgroup config
func (*Limiter) Put ¶
Put will put `process` inside cgroup in memory subsystem. This basically declare that you want `process`'s memory usage to be monitored, throttled, and killed when exceeding the limit of `Limiter`.
Click to show internal directories.
Click to hide internal directories.