Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvPayloads ¶
type EnvPayloads struct {
Persist EnvPersistence
}
EnvPayloads provides the functionality related to an env's payloads, as needed by state.
func (EnvPayloads) ListAll ¶
func (ps EnvPayloads) ListAll() ([]payload.FullPayloadInfo, error)
ListAll builds the list of payload information that is registered in state.
type EnvPersistence ¶
type EnvPersistence interface { // ListAll returns the list of all payloads in the environment. ListAll() ([]payload.FullPayloadInfo, error) }
EnvPersistence provides the persistence functionality for the Juju environment as a whole.
type UnitPayloads ¶
type UnitPayloads struct { // Persist is the persistence layer that will be used. Persist payloadsPersistence // Unit identifies the unit associated with the payloads. This // is the "unit ID" of the targeted unit. Unit string // Machine identifies the unit's machine. This is the "machine ID" // of the machine on which the unit is running. Machine string // contains filtered or unexported fields }
UnitPayloads provides the functionality related to a unit's payloads, as needed by state.
func NewUnitPayloads ¶
func NewUnitPayloads(st persistence.PersistenceBase, unit, machine string) *UnitPayloads
NewUnitPayloads builds a UnitPayloads for a unit.
func (UnitPayloads) List ¶
func (uw UnitPayloads) List(ids ...string) ([]payload.Result, error)
List builds the list of payload information for the provided payload IDs. If none are provided then the list contains the info for all payloads associated with the unit. Missing payloads are ignored.
func (UnitPayloads) LookUp ¶
func (uw UnitPayloads) LookUp(name, rawID string) (string, error)
LookUp returns the payload ID for the given name/rawID pair.
func (UnitPayloads) SetStatus ¶
func (uw UnitPayloads) SetStatus(id, status string) error
SetStatus updates the raw status for the identified payload to the provided value.
func (UnitPayloads) Track ¶
func (uw UnitPayloads) Track(pl payload.Payload) error
Track inserts the provided payload info in state. The new Juju ID for the payload is returned.
func (UnitPayloads) Untrack ¶
func (uw UnitPayloads) Untrack(id string) error
Untrack removes the identified payload from state. It does not trigger the actual destruction of the payload.