1
// Copyright 2015 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
6
// assignUnitDoc is a document that temporarily stores unit assignment
7
// information created during srevice creation until the unitassigner worker can
8
// come along and use it.
9
type assignUnitDoc struct {
10
// DocId is the unique id of the document, which is also the unit id of the
11
// unit to be assigned.
12
DocId string `bson:"_id"`
14
// Scope is the placement scope to apply to the unit.
15
Scope string `bson:"scope"`
17
// Directive is the placement directive to apply to the unit.
18
Directive string `bson:"directive"`
21
// UnitAssignment represents a staged unit assignment.
22
type UnitAssignment struct {
23
// Unit is the ID of the unit to be assigned.
26
// Scope is the placement scope to apply to the unit.
29
// Directive is the placement directive to apply to the unit.
33
// UnitAssignmentResult is the result of running a staged unit assignment.
34
type UnitAssignmentResult struct {