Documentation ¶
Index ¶
- type UnitFacade
- func (uf UnitFacade) List(args params.Entities) (internal.PayloadResults, error)
- func (uf UnitFacade) LookUp(args internal.LookUpArgs) (internal.PayloadResults, error)
- func (uf UnitFacade) SetStatus(args internal.SetStatusArgs) (internal.PayloadResults, error)
- func (uf UnitFacade) Track(args internal.TrackArgs) (internal.PayloadResults, error)
- func (uf UnitFacade) Untrack(args params.Entities) (internal.PayloadResults, error)
- type UnitPayloads
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UnitFacade ¶
type UnitFacade struct { // State exposes the payload aspect of Juju's state. State UnitPayloads }
UnitFacade serves payload-specific API methods.
func NewUnitFacade ¶
func NewUnitFacade(st UnitPayloads) *UnitFacade
NewUnitFacade builds a new facade for the given State.
func (UnitFacade) List ¶
func (uf UnitFacade) List(args params.Entities) (internal.PayloadResults, error)
List builds the list of payload being tracked for the given unit and IDs. If no IDs are provided then all tracked payloads for the unit are returned.
func (UnitFacade) LookUp ¶
func (uf UnitFacade) LookUp(args internal.LookUpArgs) (internal.PayloadResults, error)
LookUp identifies the payload with the provided name and raw ID.
func (UnitFacade) SetStatus ¶
func (uf UnitFacade) SetStatus(args internal.SetStatusArgs) (internal.PayloadResults, error)
SetStatus sets the raw status of a payload.
func (UnitFacade) Track ¶
func (uf UnitFacade) Track(args internal.TrackArgs) (internal.PayloadResults, error)
Track stores a payload to be tracked in state.
func (UnitFacade) Untrack ¶
func (uf UnitFacade) Untrack(args params.Entities) (internal.PayloadResults, error)
Untrack marks the identified payload as no longer being tracked.
type UnitPayloads ¶
type UnitPayloads interface { // Track tracks a payload for the unit and info. Track(info payload.Payload) error // List returns information on the payload with the id on the unit. List(ids ...string) ([]payload.Result, error) // Settatus sets the status for the payload with the given id on the unit. SetStatus(id, status string) error // LookUp returns the payload ID for the given name/rawID pair. LookUp(name, rawID string) (string, error) // Untrack removes the information for the payload with the given id. Untrack(id string) error }
UnitPayloads exposes the State functionality for a unit's payloads.
Click to show internal directories.
Click to hide internal directories.