package sys
import "github.com/containerd/containerd/sys"
Index ¶
- Constants
- Variables
- func AdjustOOMScore(pid, score int) error
- func CreateUnixSocket(path string) (net.Listener, error)
- func ForceRemoveAll(path string) error
- func GetLocalListener(path string, uid, gid int) (net.Listener, error)
- func GetOOMScoreAdj(pid int) (int, error)
- func MkdirAllWithACL(path string, perm os.FileMode) error
- func SetOOMScore(pid, score int) error
- func StatATimeAsTime(st *syscall.Stat_t) time.Time
- func StatAtime(st *syscall.Stat_t) syscall.Timespec
- func StatCtime(st *syscall.Stat_t) syscall.Timespec
- func StatMtime(st *syscall.Stat_t) syscall.Timespec
Constants ¶
const ( // OOMScoreMaxKillable is not implemented on non Linux OOMScoreMaxKillable = 0 // OOMScoreAdjMax is not implemented on non Linux OOMScoreAdjMax = 0 )
Variables ¶
var RunningInUserNS = userns.RunningInUserNS
RunningInUserNS detects whether we are currently running in a user namespace. Deprecated: use github.com/containerd/containerd/pkg/userns.RunningInUserNS instead.
Functions ¶
func AdjustOOMScore ¶
AdjustOOMScore sets the oom score for the provided pid. If the provided score is out of range (-1000 - 1000), it is clipped to the min/max value.
Not implemented on Windows
func CreateUnixSocket ¶
CreateUnixSocket creates a unix socket and returns the listener
func ForceRemoveAll ¶
ForceRemoveAll on unix is just a wrapper for os.RemoveAll
func GetLocalListener ¶
GetLocalListener returns a listener out of a unix socket.
func GetOOMScoreAdj ¶
GetOOMScoreAdj gets the oom score for a process
Not implemented on Windows
func MkdirAllWithACL ¶
MkdirAllWithACL is a wrapper for os.MkdirAll on Unix systems.
func SetOOMScore ¶
SetOOMScore sets the oom score for the process
Not implemented on Windows
func StatATimeAsTime ¶
StatATimeAsTime returns the access time as a time.Time
func StatAtime ¶
StatAtime returns the access time from a stat struct
func StatCtime ¶
StatCtime returns the created time from a stat struct
func StatMtime ¶
StatMtime returns the modified time from a stat struct
Source Files ¶
filesys_unix.go oom_unsupported.go socket_unix.go stat_bsd.go userns_deprecated.go
Directories ¶
Path | Synopsis |
---|---|
sys/reaper |
- Version
- v1.5.10
- Published
- Mar 2, 2022
- Platform
- darwin/amd64
- Imports
- 8 packages
- Last checked
- 4 minutes ago –
Tools for package owners.