Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JobPriorityValue = map[JobPriority]float64{
"LOW": 0.5,
"NORMAL": 1.0,
"HIGH": 2.0,
}
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct {
Id string `json:"id"`
Image string `json:"image,omitempty"` // pass into CommandInfo.CommandInfo_ContainerInfo.Image
Volumes []*mesos.Volume `json:"volumes,omitempty"`
Shell bool `json:"shell,omitempty"`
// command is "value" in mesos.CommandInfo
// if shell == false, command is the binary, arguments are args
Command *string `json:"command,omitempty"`
// arguments are only read if shell == false
Arguments []string `json:"arguments,omitempty"`
Environment map[string]string `json:"environment,omitempty"`
CpuResources float64 `json:"cpus"`
MemResources float64 `json:"mem"`
// contains filtered or unexported fields
}
func (*Job) ComputePriority ¶
recompute job priority based on last run, time, etc
func (*Job) CreateCommandInfo ¶
func (j *Job) CreateCommandInfo() mesos.CommandInfo
used when scheduler creates a new TaskInfo for this job. TODO should task creation be in this package?
func (*Job) NextScheduledRun ¶
type JobPriority ¶
type JobPriority string
const ( LowPriority JobPriority = "LOW" NormalPriority JobPriority = "NORMAL" HighPriority JobPriority = "HIGH" )
Click to show internal directories.
Click to hide internal directories.