~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/state/unit_assignment.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2015 Canonical Ltd.
 
2
// Licensed under the AGPLv3, see LICENCE file for details.
 
3
 
 
4
package state
 
5
 
 
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"`
 
13
 
 
14
        // Scope is the placement scope to apply to the unit.
 
15
        Scope string `bson:"scope"`
 
16
 
 
17
        // Directive is the placement directive to apply to the unit.
 
18
        Directive string `bson:"directive"`
 
19
}
 
20
 
 
21
// UnitAssignment represents a staged unit assignment.
 
22
type UnitAssignment struct {
 
23
        // Unit is the ID of the unit to be assigned.
 
24
        Unit string
 
25
 
 
26
        // Scope is the placement scope to apply to the unit.
 
27
        Scope string
 
28
 
 
29
        // Directive is the placement directive to apply to the unit.
 
30
        Directive string
 
31
}
 
32
 
 
33
// UnitAssignmentResult is the result of running a staged unit assignment.
 
34
type UnitAssignmentResult struct {
 
35
        Unit  string
 
36
        Error error
 
37
}