Documentation
¶
Index ¶
- func AnyJobNeedsState(jobs ...MachineJob) bool
- type ActionInfo
- type AnnotationInfo
- type BlockInfo
- type BlockType
- type Delta
- type Endpoint
- type EntityId
- type EntityInfo
- type EnvironmentInfo
- type Life
- type MachineInfo
- type MachineJob
- type RelationInfo
- type RelationUnitsChange
- type ServiceInfo
- type Status
- type StatusInfo
- type UnitInfo
- type UnitSettings
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 { EnvUUID string Id string Receiver string Name string Parameters map[string]interface{} Status string Message string Results map[string]interface{} Enqueued time.Time Started time.Time Completed time.Time }
ActionInfo holds the information about a action that is tracked by multiwatcherStore.
func (*ActionInfo) EntityId ¶
func (i *ActionInfo) EntityId() EntityId
EntityId returns a unique identifier for an action across environments.
type AnnotationInfo ¶
AnnotationInfo holds the information about an annotation that is tracked by multiwatcherStore.
func (*AnnotationInfo) EntityId ¶
func (i *AnnotationInfo) EntityId() EntityId
EntityId returns a unique identifier for an annotation across environments.
type BlockInfo ¶
BlockInfo holds the information about a block that is tracked by multiwatcherStore.
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 Endpoint ¶
type Endpoint struct { ServiceName string Relation charm.Relation }
Endpoint holds a service-relation pair.
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 EnvironmentInfo ¶
EnvironmentInfo holds the information about an environment that is tracked by multiwatcherStore.
func (*EnvironmentInfo) EntityId ¶
func (i *EnvironmentInfo) EntityId() EntityId
EntityId returns a unique identifier for an environment.
type Life ¶
type Life string
Life describes the lifecycle state of an entity ("alive", "dying" or "dead").
type MachineInfo ¶
type MachineInfo struct { EnvUUID string Id string 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 tracked by multiwatcherStore.
func (*MachineInfo) EntityId ¶
func (i *MachineInfo) EntityId() EntityId
EntityId returns a unique identifier for a machine across environments.
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 ¶
RelationInfo holds the information about a relation that is tracked by multiwatcherStore.
func (*RelationInfo) EntityId ¶
func (i *RelationInfo) EntityId() EntityId
EntityId returns a unique identifier for a relation across environments.
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 { EnvUUID string Name string Exposed bool CharmURL string OwnerTag string Life Life MinUnits int Constraints constraints.Value Config map[string]interface{} Subordinate bool Status StatusInfo }
ServiceInfo holds the information about a service that is tracked by multiwatcherStore.
func (*ServiceInfo) EntityId ¶
func (i *ServiceInfo) EntityId() EntityId
EntityId returns a unique identifier for a service across environments.
type Status ¶
type Status string
Status represents the status of an entity. It could be a service, unit, machine or its agent.
type StatusInfo ¶
type StatusInfo struct { Err error Current Status Message string Since *time.Time Version string Data map[string]interface{} }
StatusInfo holds the unit and machine status information. It is used by ServiceInfo and UnitInfo.
type UnitInfo ¶
type UnitInfo struct { EnvUUID string Name string Service string Series string CharmURL string PublicAddress string PrivateAddress string MachineId string Ports []network.Port PortRanges []network.PortRange Subordinate bool // The following 3 status values are deprecated. Status Status StatusInfo string StatusData map[string]interface{} // Workload and agent state are modelled separately. WorkloadStatus StatusInfo AgentStatus StatusInfo }
UnitInfo holds the information about a unit that is tracked by multiwatcherStore.
type UnitSettings ¶
type UnitSettings struct {
Version int64
}
UnitSettings holds information about a service unit's settings within a relation.