Documentation ¶
Index ¶
- func JoinRollbackJobUpdateDetails(d1, d2 *api.JobUpdateDetails) *api.JobUpdateDetails
- func NewConfigGroup(jobSummary *stateless.JobSummary, podSpec *pod.PodSpec, ...) (*api.ConfigGroup, error)
- func NewConfigGroupWithoutTaskConfig(instanceIDRange []*pod.InstanceIDRange) []*api.ConfigGroup
- func NewConfigSummary(jobSummary *stateless.JobSummary, podInfos []*pod.PodInfo) (*api.ConfigSummary, error)
- func NewConstraints(constraint *pod.Constraint) ([]*api.Constraint, error)
- func NewIdentity(user string) *api.Identity
- func NewJobConfiguration(jobSummary *stateless.JobSummary, podSpec *pod.PodSpec, activeOnly bool) (*api.JobConfiguration, error)
- func NewJobInstanceUpdateEvent(instanceID uint32, e *stateless.WorkflowEvent, d *opaquedata.Data) (*api.JobInstanceUpdateEvent, error)
- func NewJobKey(jobName string) (*api.JobKey, error)
- func NewJobSummary(jobSummary *stateless.JobSummary, podSpec *pod.PodSpec) (*api.JobSummary, error)
- func NewJobUpdateAction(s stateless.WorkflowState, d *opaquedata.Data) (*api.JobUpdateAction, error)
- func NewJobUpdateDetails(k *api.JobKey, prevWorkflow *stateless.WorkflowInfo, ...) (*api.JobUpdateDetails, error)
- func NewJobUpdateEvent(e *stateless.WorkflowEvent, d *opaquedata.Data) (*api.JobUpdateEvent, error)
- func NewJobUpdateInstructions(prevWorkflow *stateless.WorkflowInfo, workflow *stateless.WorkflowInfo) (*api.JobUpdateInstructions, error)
- func NewJobUpdateSettings(u *stateless.UpdateSpec) *api.JobUpdateSettings
- func NewJobUpdateStatus(s stateless.WorkflowState, d *opaquedata.Data) (api.JobUpdateStatus, error)
- func NewJobUpdateSummary(k *api.JobKey, w *stateless.WorkflowInfo) (*api.JobUpdateSummary, error)
- func NewRange(instanceIDRange []*pod.InstanceIDRange) []*api.Range
- func NewScheduleStatus(s pod.PodState) (*api.ScheduleStatus, error)
- func NewScheduledTask(jobSummary *stateless.JobSummary, podSpec *pod.PodSpec, ...) (*api.ScheduledTask, error)
- func NewTaskConfig(jobSummary *stateless.JobSummary, podSpec *pod.PodSpec) (*api.TaskConfig, error)
- func NewTaskEvent(e *pod.PodEvent) (*api.TaskEvent, error)
- func NewTaskTier(s *stateless.SlaSpec) *string
- type JobInstanceUpdateEventsByTimestamp
- type WorkflowsByMaxTS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JoinRollbackJobUpdateDetails ¶
func JoinRollbackJobUpdateDetails(d1, d2 *api.JobUpdateDetails) *api.JobUpdateDetails
JoinRollbackJobUpdateDetails joins two updates which together represent an update followed by a manually rollback. Assumes that both updates have the same update id.
func NewConfigGroup ¶
func NewConfigGroup( jobSummary *stateless.JobSummary, podSpec *pod.PodSpec, instanceIDList []uint32, ) (*api.ConfigGroup, error)
NewConfigGroup gets new config group for provided instance ranges and aurora task config
func NewConfigGroupWithoutTaskConfig ¶
func NewConfigGroupWithoutTaskConfig( instanceIDRange []*pod.InstanceIDRange, ) []*api.ConfigGroup
NewConfigGroupWithoutTaskConfig returns a list of ConfigGroup without TaskConfig field based on input InstanceIDRange from Peloton. If the input is empty, nil will be returned.
func NewConfigSummary ¶
func NewConfigSummary( jobSummary *stateless.JobSummary, podInfos []*pod.PodInfo, ) (*api.ConfigSummary, error)
NewConfigSummary returns aurora config summary for provided list of peloton pod infos
func NewConstraints ¶
func NewConstraints(constraint *pod.Constraint) ([]*api.Constraint, error)
NewConstraints creates one or many Constraint objects (either ValueConstraint or LimitConstraint) based on input peloton pod.Constraint.
func NewIdentity ¶
NewIdentity creates an Identity object.
func NewJobConfiguration ¶
func NewJobConfiguration( jobSummary *stateless.JobSummary, podSpec *pod.PodSpec, activeOnly bool, ) (*api.JobConfiguration, error)
NewJobConfiguration creates a JobConfiguration object.
func NewJobInstanceUpdateEvent ¶
func NewJobInstanceUpdateEvent( instanceID uint32, e *stateless.WorkflowEvent, d *opaquedata.Data, ) (*api.JobInstanceUpdateEvent, error)
NewJobInstanceUpdateEvent returns a new instance update event from peloton instance update event
func NewJobKey ¶
NewJobKey creates Aurora JobKey from Peloton job name ("<role>/<environment>/<job_name>")
func NewJobSummary ¶
func NewJobSummary( jobSummary *stateless.JobSummary, podSpec *pod.PodSpec, ) (*api.JobSummary, error)
NewJobSummary creates a JobSummary object.
func NewJobUpdateAction ¶
func NewJobUpdateAction( s stateless.WorkflowState, d *opaquedata.Data, ) (*api.JobUpdateAction, error)
NewJobUpdateAction returns the job update action for aurora from peloton workflow state
func NewJobUpdateDetails ¶
func NewJobUpdateDetails( k *api.JobKey, prevWorkflow *stateless.WorkflowInfo, workflow *stateless.WorkflowInfo, ) (*api.JobUpdateDetails, error)
NewJobUpdateDetails converts a workflow into JobUpdateDetails.
func NewJobUpdateEvent ¶
func NewJobUpdateEvent( e *stateless.WorkflowEvent, d *opaquedata.Data, ) (*api.JobUpdateEvent, error)
NewJobUpdateEvent returns aurora job update event from peloton job update event
func NewJobUpdateInstructions ¶
func NewJobUpdateInstructions( prevWorkflow *stateless.WorkflowInfo, workflow *stateless.WorkflowInfo, ) (*api.JobUpdateInstructions, error)
NewJobUpdateInstructions gets new job update instructions Since Aggregator ignores task config, it is not set.
func NewJobUpdateSettings ¶
func NewJobUpdateSettings(u *stateless.UpdateSpec) *api.JobUpdateSettings
NewJobUpdateSettings converts UpdateSpec to aurora JobUpdateSettings.
func NewJobUpdateStatus ¶
func NewJobUpdateStatus( s stateless.WorkflowState, d *opaquedata.Data, ) (api.JobUpdateStatus, error)
NewJobUpdateStatus translates peloton job update state to aurora job update status.
func NewJobUpdateSummary ¶
func NewJobUpdateSummary( k *api.JobKey, w *stateless.WorkflowInfo, ) (*api.JobUpdateSummary, error)
NewJobUpdateSummary creates a new aurora job update summary using update info.
func NewRange ¶
func NewRange(instanceIDRange []*pod.InstanceIDRange) []*api.Range
NewRange converts peloton's instance id list to aurora's range
func NewScheduleStatus ¶
func NewScheduleStatus(s pod.PodState) (*api.ScheduleStatus, error)
NewScheduleStatus converts Peloton v1 PodState enum to Aurora ScheduleStatus enum.
func NewScheduledTask ¶
func NewScheduledTask( jobSummary *stateless.JobSummary, podSpec *pod.PodSpec, podEvents []*pod.PodEvent, ) (*api.ScheduledTask, error)
NewScheduledTask creates a ScheduledTask object.
func NewTaskConfig ¶
func NewTaskConfig( jobSummary *stateless.JobSummary, podSpec *pod.PodSpec, ) (*api.TaskConfig, error)
NewTaskConfig returns aurora task config for a provided peloton pod spec
func NewTaskEvent ¶
NewTaskEvent converts Peloton PodEvent to Aurora TaskEvent.
func NewTaskTier ¶
NewTaskTier converts Peloton SlaSpec to Aurora TaskTier string.
Types ¶
type JobInstanceUpdateEventsByTimestamp ¶
type JobInstanceUpdateEventsByTimestamp []*api.JobInstanceUpdateEvent
JobInstanceUpdateEventsByTimestamp sorts instance update events by timestamp.
func (JobInstanceUpdateEventsByTimestamp) Len ¶
func (s JobInstanceUpdateEventsByTimestamp) Len() int
func (JobInstanceUpdateEventsByTimestamp) Less ¶
func (s JobInstanceUpdateEventsByTimestamp) Less(i, j int) bool
func (JobInstanceUpdateEventsByTimestamp) Swap ¶
func (s JobInstanceUpdateEventsByTimestamp) Swap(i, j int)
type WorkflowsByMaxTS ¶
type WorkflowsByMaxTS []*stateless.WorkflowInfo
WorkflowsByMaxTS sorts stateless.WorkflowInfo by timestamp of latest event
func (WorkflowsByMaxTS) Len ¶
func (w WorkflowsByMaxTS) Len() int
func (WorkflowsByMaxTS) Less ¶
func (w WorkflowsByMaxTS) Less(i, j int) bool
func (WorkflowsByMaxTS) Swap ¶
func (w WorkflowsByMaxTS) Swap(i, j int)
Source Files ¶
- config_group.go
- config_summary.go
- constraint.go
- identity.go
- job_instance_update_event.go
- job_key.go
- job_summary.go
- job_update_action.go
- job_update_details.go
- job_update_event.go
- job_update_instructions.go
- job_update_settings.go
- job_update_status.go
- job_update_summary.go
- range.go
- schedule_status.go
- scheduled_task.go
- task_config.go
- task_event.go
- task_tier.go
- util.go