From 7b843626b0cb2c46230a9b199876eebaf9d6d209 Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Tue, 20 Oct 2015 16:16:05 -0700 Subject: [PATCH] Added the UpdataStrategy struct to the api/jobs struct so that we don't loose the information passed on from the cli --- api/jobs.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/jobs.go b/api/jobs.go index f1cf189bf..b2b6666bd 100644 --- a/api/jobs.go +++ b/api/jobs.go @@ -100,6 +100,12 @@ func (j *Jobs) ForceEvaluate(jobID string, q *WriteOptions) (string, *WriteMeta, return resp.EvalID, wm, nil } +//UpdateStrategy is for serializing update strategy for a job. +type UpdateStrategy struct { + Stagger time.Duration + MaxParallel int +} + // Job is used to serialize a job. type Job struct { Region string @@ -111,6 +117,7 @@ type Job struct { Datacenters []string Constraints []*Constraint TaskGroups []*TaskGroup + Update *UpdateStrategy Meta map[string]string Status string StatusDescription string