1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/vendor/github.com/docker/swarmkit/manager/allocator/doc.go
Aaron Lehmann 077f08bf54 Vendor swarmkit 8f053c2
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-05-02 15:51:26 -07:00

18 lines
986 B
Go

// Package allocator aims to manage allocation of different
// cluster-wide resources on behalf of the manager. In particular, it
// manages a set of independent allocator processes which can mostly
// execute concurrently with only a minimal need for coordination.
//
// One of the instances where it needs coordination is when deciding to
// move a task to the PENDING state. Since a task can move to the
// PENDING state only when all the task allocators have completed,
// they must cooperate. The way `allocator` achieves this is by creating
// a `taskBallot` to which all task allocators register themselves as
// mandatory voters. For each task that needs allocation, each allocator
// independently votes to indicate the completion of their allocation.
// Once all registered voters have voted then the task is moved to the
// PENDING state.
//
// Other than the coordination needed for task PENDING state, all
// the allocators function fairly independently.
package allocator