From d2ab5bcf6cedbae64e2bd5e1681834cd3ded31bb Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Tue, 4 Aug 2015 14:04:33 -0700 Subject: [PATCH] nomad: adding the FSM CRUD --- nomad/structs/structs.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 {