Documentation ¶
Index ¶
- func NewConstraint(jobKeyLabel *peloton.Label, cs []*api.Constraint) (*pod.Constraint, error)
- func NewCreateSpec(s *api.JobUpdateSettings) *stateless.CreateSpec
- func NewJobName(k *api.JobKey) string
- func NewJobSpecFromJobUpdateRequest(r *api.JobUpdateRequest, respoolID *peloton.ResourcePoolID, ...) (*stateless.JobSpec, error)
- func NewPodSpec(t *api.TaskConfig, c config.ThermosExecutorConfig) (*pod.PodSpec, error)
- func NewPodState(scheduleStatus api.ScheduleStatus) (pod.PodState, error)
- func NewThermosCommandInfo(c ThermosExecutorConfig) *mesos_v1.CommandInfo
- func NewThermosExecutorInfo(c ThermosExecutorConfig, executorData []byte) *mesos_v1.ExecutorInfo
- func NewUpdateSpec(s *api.JobUpdateSettings, inPlace bool) *stateless.UpdateSpec
- func NewWorkflowState(astate api.JobUpdateStatus) (stateless.WorkflowState, error)
- type ThermosExecutorConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConstraint ¶
func NewConstraint( jobKeyLabel *peloton.Label, cs []*api.Constraint, ) (*pod.Constraint, error)
NewConstraint creates a new Constraint.
func NewCreateSpec ¶
func NewCreateSpec(s *api.JobUpdateSettings) *stateless.CreateSpec
NewCreateSpec creates a new CreateSpec.
func NewJobSpecFromJobUpdateRequest ¶
func NewJobSpecFromJobUpdateRequest( r *api.JobUpdateRequest, respoolID *peloton.ResourcePoolID, c config.ThermosExecutorConfig, ) (*stateless.JobSpec, error)
NewJobSpecFromJobUpdateRequest creates a new JobSpec.
func NewPodSpec ¶
func NewPodSpec( t *api.TaskConfig, c config.ThermosExecutorConfig, ) (*pod.PodSpec, error)
NewPodSpec creates a new PodSpec.
func NewPodState ¶
func NewPodState( scheduleStatus api.ScheduleStatus) (pod.PodState, error)
NewPodState converts Aurora ScheduleStatus enum to Peloton PodState enum.
func NewThermosCommandInfo ¶
func NewThermosCommandInfo( c ThermosExecutorConfig, ) *mesos_v1.CommandInfo
NewThermosCommandInfo creates Mesos CommandInfo for thermos executor similar to Aurora's behavior. Reference: https://github.com/apache/aurora/blob/master/src/main/java/org/apache/aurora/scheduler/configuration/executor/ExecutorModule.java#L120
func NewThermosExecutorInfo ¶
func NewThermosExecutorInfo( c ThermosExecutorConfig, executorData []byte, ) *mesos_v1.ExecutorInfo
NewThermosExecutorInfo creates Mesos ExecutorInfo for thermos executor.
func NewUpdateSpec ¶
func NewUpdateSpec( s *api.JobUpdateSettings, inPlace bool, ) *stateless.UpdateSpec
NewUpdateSpec creates a new UpdateSpec.
func NewWorkflowState ¶
func NewWorkflowState( astate api.JobUpdateStatus) (stateless.WorkflowState, error)
NewWorkflowState converts aurora update status to peloton job update state
Types ¶
type ThermosExecutorConfig ¶
type ThermosExecutorConfig struct { // The following themros executor related flags should have identical // behavior as the one with Aurora Scheduler: // http://aurora.apache.org/documentation/latest/reference/scheduler-configuration/ // // path: // Path to the thermos executor entry point. // resources: // A comma separated list of additional // resources to copy into the sandbox.Note: if thermos_executor_path // is not the thermos_executor.pex file itself, this must include it. // flags: // Extra arguments to be passed to the thermos executor // cpu: // The number of CPU cores to allocate for each instance of the executor. // ram: // The amount of RAM in MB to allocate for each instance of the executor. Path string `yaml:"path"` Resources string `yaml:"resources"` Flags string `yaml:"flags"` CPU float64 `yaml:"cpu"` RAM int64 `yaml:"ram"` }
ThermosExecutorConfig wraps the config for thermos executor
func (*ThermosExecutorConfig) Validate ¶
func (c *ThermosExecutorConfig) Validate() error
Validate validates ThermosExecutorConfig