Updating library for compatibility with Aurora 0.16.0 final. Thrift API differs from main Aurora one due to TaskUpdateQuery fields resulting in errors when serialized by thrift as non-optionals.

This commit is contained in:
Renan DelValle 2016-09-29 20:45:24 -04:00
parent 3a78e32e27
commit 3fd957fe5c
15 changed files with 2058 additions and 1020 deletions

View file

@ -33,7 +33,7 @@ type Realis interface {
CreateJob(auroraJob Job) (*aurora.Response, error)
FetchTaskConfig(instKey aurora.InstanceKey) (*aurora.TaskConfig, error)
GetInstanceIds(key *aurora.JobKey, states map[aurora.ScheduleStatus]bool) (map[int32]bool, error)
JobUpdateDetails(updateKey aurora.JobUpdateKey) (*aurora.Response, error)
JobUpdateDetails(updateQuery aurora.JobUpdateQuery) (*aurora.Response, error)
KillJob(key *aurora.JobKey) (*aurora.Response, error)
KillInstances(key *aurora.JobKey, instances ...int32) (*aurora.Response, error)
RestartInstances(key *aurora.JobKey, instances ...int32) (*aurora.Response, error)
@ -280,9 +280,9 @@ func (r realisClient) FetchTaskConfig(instKey aurora.InstanceKey) (*aurora.TaskC
return tasks[0].AssignedTask.Task, nil
}
func (r realisClient) JobUpdateDetails(updateKey aurora.JobUpdateKey) (*aurora.Response, error) {
func (r realisClient) JobUpdateDetails(updateQuery aurora.JobUpdateQuery) (*aurora.Response, error) {
resp, err := r.client.GetJobUpdateDetails(&updateKey)
resp, err := r.client.GetJobUpdateDetails(&updateQuery)
if err != nil {
return nil, errors.Wrap(err, "Unable to get job update details")
}