diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index f26846935..88836112b 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -23,6 +23,7 @@ const ( JobDeregisterRequestType EvalUpdateRequestType EvalDeleteRequestType + AllocUpdateRequestType ) const ( @@ -192,6 +193,17 @@ type PlanRequest struct { WriteRequest } +// AllocUpdateRequest is used to submit changes to allocations, either +// to cause evictions or to assign new allocaitons. Both can be done +// within a single transaction +type AllocUpdateRequest struct { + // Evict is the list of allocation IDs to evict + Evict []string + + // Alloc is the list of new allocations to assign + Alloc []*Allocation +} + // GenericResponse is used to respond to a request where no // specific response information is needed. type GenericResponse struct {