Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyJobNeedsState ¶
func AnyJobNeedsState(jobs ...MachineJob) bool
AnyJobNeedsState returns true if any of the provided jobs require a state connection.
Types ¶
type ActionInfo ¶
type ActionInfo struct {
Id string `bson:"_id"`
Receiver string `bson:"receiver"`
Name string `bson:"name"`
Parameters map[string]interface{} `bson:"parameters"`
Status string `bson:"status"`
Message string `bson:"message"`
Results map[string]interface{} `bson:"results"`
Enqueued time.Time `bson:"enqueued"`
Started time.Time `bson:"started"`
Completed time.Time `bson:"completed"`
}
func (*ActionInfo) EntityId ¶
func (i *ActionInfo) EntityId() EntityId
type AnnotationInfo ¶
func (*AnnotationInfo) EntityId ¶
func (i *AnnotationInfo) EntityId() EntityId
type Delta ¶
type Delta struct {
// If Removed is true, the entity has been removed;
// otherwise it has been created or changed.
Removed bool
// Entity holds data about the entity that has changed.
Entity EntityInfo
}
Delta holds details of a change to the environment.
func (*Delta) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Delta) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type EntityInfo ¶
type EntityInfo interface {
// EntityId returns an identifier that will uniquely
// identify the entity within its kind
EntityId() EntityId
}
EntityInfo is implemented by all entity Info types.
type Life ¶
type Life string
Life describes the lifecycle state of an entity ("alive", "dying" or "dead").
type MachineInfo ¶
type MachineInfo struct {
Id string `bson:"_id"`
InstanceId string
Status Status
StatusInfo string
StatusData map[string]interface{}
Life Life
Series string
SupportedContainers []instance.ContainerType
SupportedContainersKnown bool
HardwareCharacteristics *instance.HardwareCharacteristics `json:",omitempty"`
Jobs []MachineJob
Addresses []network.Address
HasVote bool
WantsVote bool
}
MachineInfo holds the information about a Machine that is watched by StateMultiwatcher.
func (*MachineInfo) EntityId ¶
func (i *MachineInfo) EntityId() EntityId
type MachineJob ¶
type MachineJob string
MachineJob values define responsibilities that machines may be expected to fulfil.
const ( JobHostUnits MachineJob = "JobHostUnits" JobManageEnviron MachineJob = "JobManageEnviron" JobManageNetworking MachineJob = "JobManageNetworking" // Deprecated in 1.18 JobManageStateDeprecated MachineJob = "JobManageState" )
func (MachineJob) NeedsState ¶
func (job MachineJob) NeedsState() bool
NeedsState returns true if the job requires a state connection.
type RelationInfo ¶
func (*RelationInfo) EntityId ¶
func (i *RelationInfo) EntityId() EntityId
type RelationUnitsChange ¶
type RelationUnitsChange struct {
Changed map[string]UnitSettings
Departed []string
}
When remote units leave scope, their ids will be noted in the Departed field, and no further events will be sent for those units.
type ServiceInfo ¶
type ServiceInfo struct {
Name string `bson:"_id"`
Exposed bool
CharmURL string
OwnerTag string
Life Life
MinUnits int
Constraints constraints.Value
Config map[string]interface{}
Subordinate bool
}
func (*ServiceInfo) EntityId ¶
func (i *ServiceInfo) EntityId() EntityId
type Status ¶
type Status string
Status represents the status of an entity. It could be a service, unit, machine or its agent.
type UnitInfo ¶
type UnitSettings ¶
type UnitSettings struct {
Version int64
}
UnitSettings holds information about a service unit's settings within a relation.