Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type Application ¶
type Application interface { CharmURL() (curl *string, force bool) CharmOrigin() *state.CharmOrigin ApplicationTag() names.ApplicationTag UnitCount() int }
Application is the subset of *state.Application that we need.
type CharmRevisionUpdater ¶
type CharmRevisionUpdater interface {
UpdateLatestRevisions() (params.ErrorResult, error)
}
CharmRevisionUpdater defines the methods on the charmrevisionupdater API end point.
type CharmRevisionUpdaterAPI ¶
type CharmRevisionUpdaterAPI struct {
// contains filtered or unexported fields
}
CharmRevisionUpdaterAPI implements the CharmRevisionUpdater interface and is the concrete implementation of the api end point.
func NewCharmRevisionUpdaterAPIState ¶
func NewCharmRevisionUpdaterAPIState( state State, clock clock.Clock, newCharmhubClient newCharmhubClientFunc, ) (*CharmRevisionUpdaterAPI, error)
NewCharmRevisionUpdaterAPIState creates a new charmrevisionupdater API with a State interface directly (mainly for use in tests).
func (*CharmRevisionUpdaterAPI) UpdateLatestRevisions ¶
func (api *CharmRevisionUpdaterAPI) UpdateLatestRevisions() (params.ErrorResult, error)
UpdateLatestRevisions retrieves the latest revision information from the charm store for all deployed charms and records this information in state.
type CharmhubRefreshClient ¶
type CharmhubRefreshClient interface { RefreshWithRequestMetrics(ctx context.Context, config charmhub.RefreshConfig, metrics map[metrics.MetricKey]map[metrics.MetricKey]string) ([]transport.RefreshResponse, error) RefreshWithMetricsOnly(ctx context.Context, metrics map[metrics.MetricKey]map[metrics.MetricKey]string) error }
CharmhubRefreshClient is an interface for the methods of the charmhub client that we need.
type Model ¶
type Model interface { CloudName() string CloudRegion() string Config() (*config.Config, error) IsControllerModel() bool Metrics() (state.ModelMetrics, error) ModelTag() names.ModelTag UUID() string }
Model is the subset of *state.Model that we need.
type State ¶
type State interface { AddCharmPlaceholder(curl *charm.URL) error AllApplications() ([]Application, error) Charm(curl string) (*state.Charm, error) Cloud(name string) (cloud.Cloud, error) ControllerUUID() string Model() (Model, error) Resources() state.Resources AliveRelationKeys() []string }
State is the subset of *state.State that we need.