Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NewCharmStoreClient = func(st *state.State) (charmstore.Client, error) { controllerCfg, err := st.ControllerConfig() if err != nil { return charmstore.Client{}, errors.Trace(err) } return charmstore.NewCachingClient(state.MacaroonCache{st}, controllerCfg.CharmStoreURL()) }
NewCharmStoreClient instantiates a new charm store repository. Exported so we can change it during testing.
Functions ¶
func RegisterLatestCharmHandler ¶
RegisterLatestCharmHandler adds the factory func for the identified handler to the handler registry.
Types ¶
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 NewCharmRevisionUpdaterAPI ¶
func NewCharmRevisionUpdaterAPI( st *state.State, resources facade.Resources, authorizer facade.Authorizer, ) (*CharmRevisionUpdaterAPI, error)
NewCharmRevisionUpdaterAPI creates a new server-side charmrevisionupdater API end point.
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 LatestCharmHandler ¶
type LatestCharmHandler interface { // HandleLatest deals with the given charm info, treating it as the // most up-to-date information for the charms most recent revision. HandleLatest(names.ApplicationTag, charmstore.CharmInfo) error }
LatestCharmHandler exposes the functionality needed to deal with the latest info (from the store) for a charm.