Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service defines a service for interacting with the underlying state.
func NewService ¶
NewService returns a new Service for interacting with the underlying state.
func (*Service) GetUnitUUIDForName ¶
GetUnitUUIDForName returns the UUID corresponding to the input unit name. If no unit with the name exists, a [unitstateerrors.UnitNotFound] error is returned.
type State ¶
type State interface { domain.AtomicStateBase // GetUnitUUIDForName returns the UUID for // the unit identified by the input name. GetUnitUUIDForName(domain.AtomicContext, string) (string, error) // EnsureUnitStateRecord ensures that there is a record // for the agent state for the unit with the input UUID. EnsureUnitStateRecord(domain.AtomicContext, string) error // UpdateUnitStateUniter updates the agent uniter // state for the unit with the input UUID. UpdateUnitStateUniter(domain.AtomicContext, string, string) error // UpdateUnitStateStorage updates the agent storage // state for the unit with the input UUID. UpdateUnitStateStorage(domain.AtomicContext, string, string) error // UpdateUnitStateSecret updates the agent secret // state for the unit with the input UUID. UpdateUnitStateSecret(domain.AtomicContext, string, string) error // SetUnitStateCharm replaces the agent charm // state for the unit with the input UUID. SetUnitStateCharm(domain.AtomicContext, string, map[string]string) error // SetUnitStateRelation replaces the agent relation // state for the unit with the input UUID. SetUnitStateRelation(domain.AtomicContext, string, map[int]string) error // GetUnitState returns the full unit agent state. // If no unit with the uuid exists, a [unitstateerrors.UnitNotFound] error // is returned. // If the units state is empty [unitstateerrors.EmptyUnitState] error is // returned. GetUnitState(ctx context.Context, uuid string) (unitstate.RetrievedUnitState, error) }
State defines an interface for interacting with the underlying state.
Click to show internal directories.
Click to hide internal directories.