Documentation ¶
Index ¶
Constants ¶
const ( // StartPulsed represents a startJobUpdate request with a non-zero // blockIfNoPulsesAfterMs. StartPulsed UpdateAction = "start_pulsed" // Pulse represents a pulseJobUpdate request. Pulse = "pulse" // Rollback represents a rollbackJobUpdate request. Rollback = "rollback" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { UpdateID string `json:"update_id,omitempty"` UpdateActions []UpdateAction `json:"update_actions,omitempty"` UpdateMetadata []*api.Metadata `json:"update_metadata,omitempty"` StartJobUpdateMessage string `json:"start_job_update_msg,omitempty"` }
Data is used to annotate Peloton updates with information that does not directly map into the Peloton API. It has no meaning in Peloton, however can be used when converting Peloton objects into Aurora objects to reconstruct Aurora states which do not exist in Peloton.
func Deserialize ¶
func Deserialize(od *peloton.OpaqueData) (*Data, error)
Deserialize deserializes od into a Data struct. If od is empty, an empty Data struct is returned.
func NewDataFromJobUpdateRequest ¶
func NewDataFromJobUpdateRequest( request *api.JobUpdateRequest, message *string, ) *Data
NewDataFromJobUpdateRequest creates opaquedata.Data from aurora JobUpdateRequest
func (*Data) AppendUpdateAction ¶
func (d *Data) AppendUpdateAction(a UpdateAction)
AppendUpdateAction appends a to d's update actions.
func (*Data) ContainsUpdateAction ¶
func (d *Data) ContainsUpdateAction(a UpdateAction) bool
ContainsUpdateAction returns true if d contains a.
func (*Data) IsLatestUpdateAction ¶
func (d *Data) IsLatestUpdateAction(a UpdateAction) bool
IsLatestUpdateAction returns true if a is the latest UpdateAction in d.
type UpdateAction ¶
type UpdateAction string
UpdateAction is an Aurora update action which has no equivalent in Peloton.