Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PolicyStrings ¶ added in v0.2.0
func PolicyStrings() []string
PolicyStrings returns a slice of all String values of the enum
Types ¶
type Policy ¶
type Policy int
Policy is a scheduling policy.
const ( Normal Policy = 0 FIFO Policy = 1 RR Policy = 2 Batch Policy = 3 Idle Policy = 5 Deadline Policy = 6 )
Possible values for sched_policy.
func Get ¶
Get gets the scheduling policy and parameters for the process specified by pid.
Calls sched_getscheduler. https://man7.org/linux/man-pages/man2/sched_setscheduler.2.html
func PolicyString ¶ added in v0.2.0
PolicyString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func PolicyValues ¶ added in v0.2.0
func PolicyValues() []Policy
PolicyValues returns all values of the enum
func (Policy) IsAPolicy ¶ added in v0.2.0
IsAPolicy returns "true" if the value is listed in the enum definition. "false" otherwise
func (Policy) MarshalText ¶ added in v0.2.0
MarshalText implements the encoding.TextMarshaler interface for Policy
func (*Policy) UnmarshalText ¶ added in v0.2.0
UnmarshalText implements the encoding.TextUnmarshaler interface for Policy