Documentation ¶
Index ¶
Constants ¶
const ( // The default user that the executor uses to run tasks DefaultUnpriviledgedUser = "nobody" // CheckBufSize is the size of the check output result CheckBufSize = 4 * 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckResult ¶ added in v0.3.2
type CheckResult struct { // ExitCode is the exit code of the check ExitCode int // Output is the output of the check script Output string // Timestamp is the time at which the check was executed Timestamp time.Time // Duration is the time it took the check to run Duration time.Duration // Err is the error that a check returned Err error }
CheckResult encapsulates the result of a check
type CpuStats ¶
type CpuStats struct { SystemMode float64 UserMode float64 ThrottledPeriods uint64 ThrottledTime uint64 Percent float64 }
CpuStats holds cpu usage related stats
type IsolationConfig ¶ added in v0.3.0
type IsolationConfig struct { Cgroup *cgroupConfig.Cgroup CgroupPaths map[string]string }
IsolationConfig has information about the isolation mechanism the executor uses to put resource constraints and isolation on the user process
type MemoryStats ¶
type MemoryStats struct { RSS uint64 Cache uint64 Swap uint64 MaxUsage uint64 KernelUsage uint64 KernelMaxUsage uint64 }
MemoryStats holds memory usage related stats
type RecoverableError ¶ added in v0.3.1
RecoverableError wraps an error and marks whether it is recoverable and could be retried or it is fatal.
func NewRecoverableError ¶ added in v0.3.1
func NewRecoverableError(e error, recoverable bool) *RecoverableError
NewRecoverableError is used to wrap an error and mark it as recoverable or not.
func (*RecoverableError) Error ¶ added in v0.3.1
func (r *RecoverableError) Error() string
type ResourceUsage ¶
type ResourceUsage struct { MemoryStats *MemoryStats CpuStats *CpuStats }
ResourceUsage holds information related to cpu and memory stats
type TaskResourceUsage ¶
type TaskResourceUsage struct { ResourceUsage *ResourceUsage Timestamp int64 Pids map[string]*ResourceUsage }
TaskResourceUsage holds aggregated resource usage of all processes in a Task and the resource usage of the individual pids
type WaitResult ¶
WaitResult stores the result of a Wait operation.
func NewWaitResult ¶
func NewWaitResult(code, signal int, err error) *WaitResult
func (*WaitResult) String ¶
func (r *WaitResult) String() string
func (*WaitResult) Successful ¶
func (r *WaitResult) Successful() bool