Back to / apiserver / facades / controller / charmrevisionupdater

Package charmrevisionupdater

Latest Go to latest

The latest major version is .

Published: today | License: AGPL-3.0 | Module:



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{State: st}, controllerCfg.CharmStoreURL())

NewCharmStoreClient instantiates a new charm store repository. Exported so we can change it during testing.

func RegisterLatestCharmHandler

func RegisterLatestCharmHandler(name string, newHandler newHandlerFunc) error

RegisterLatestCharmHandler adds the factory func for the identified handler to the handler registry.

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.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier