Documentation ¶
Overview ¶
Package hook provides types that define the hooks known to the Uniter
Index ¶
Constants ¶
View Source
const ( LeaderElected hooks.Kind = "leader-elected" LeaderDeposed hooks.Kind = "leader-deposed" LeaderSettingsChanged hooks.Kind = "leader-settings-changed" )
TODO(fwereade): move these definitions to juju/charm/hooks.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Committer ¶
Committer is an interface that may be used to convey the fact that the specified hook has been successfully executed, and committed.
type Info ¶
type Info struct { Kind hooks.Kind `yaml:"kind"` // RelationId identifies the relation associated with the hook. It is // only set when Kind indicates a relation hook. RelationId int `yaml:"relation-id,omitempty"` // RemoteUnit is the name of the unit that triggered the hook. It is only // set when Kind indicates a relation hook other than relation-broken. RemoteUnit string `yaml:"remote-unit,omitempty"` // RemoteApplication is always set if either an app or a unit triggers the hook. // If the app triggers the hook, then RemoteUnit will be empty RemoteApplication string `yaml:"remote-application,omitempty"` // ChangeVersion identifies the most recent unit settings change // associated with RemoteUnit. It is only set when RemoteUnit is set. ChangeVersion int64 `yaml:"change-version,omitempty"` // StorageId is the ID of the storage instance relevant to the hook. StorageId string `yaml:"storage-id,omitempty"` // DepartingUnit is the name of the unit that goes away. It is only set // when Kind indicates a relation-departed hook. DepartingUnit string `yaml:"departee,omitempty"` // WorkloadName is the name of the sidecar container or workload relevant to the hook. WorkloadName string `yaml:"workload-name,omitempty"` }
Info holds details required to execute a hook. Not all fields are relevant to all Kind values.
Click to show internal directories.
Click to hide internal directories.