mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
wip: scaling status return, almost done
This commit is contained in:
@@ -177,8 +177,8 @@ func (j *Jobs) Scale(jobID, group string, count int,
|
||||
|
||||
// ScaleStatus is used to retrieve information about a particular
|
||||
// job given its unique ID.
|
||||
func (j *Jobs) ScaleStatus(jobID string, q *QueryOptions) (*ScaleStatusResponse, *QueryMeta, error) {
|
||||
var resp ScaleStatusResponse
|
||||
func (j *Jobs) ScaleStatus(jobID string, q *QueryOptions) (*JobScaleStatusResponse, *QueryMeta, error) {
|
||||
var resp JobScaleStatusResponse
|
||||
qm, err := j.client.query(fmt.Sprintf("/v1/job/%s/scale", url.PathEscape(jobID)), &resp, q)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
||||
@@ -69,12 +69,12 @@ type ScalingPolicyListStub struct {
|
||||
ModifyIndex uint64
|
||||
}
|
||||
|
||||
// ScaleStatusResponse is the payload for a generic scaling action
|
||||
type ScaleStatusResponse struct {
|
||||
// JobScaleStatusResponse is the payload for a generic scaling action
|
||||
type JobScaleStatusResponse struct {
|
||||
JobID string
|
||||
JobCreateIndex uint64
|
||||
JobModifyIndex uint64
|
||||
Stopped bool
|
||||
JobStopped bool
|
||||
TaskGroups map[string]TaskGroupScaleStatus
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user