juju: github.com/juju/juju/apiserver/facades/controller/charmrevisionupdater Index | Files | Directories

package charmrevisionupdater

import "github.com/juju/juju/apiserver/facades/controller/charmrevisionupdater"

Index

Package Files

handlers.go updater.go

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.

func RegisterLatestCharmHandler Uses

func RegisterLatestCharmHandler(name string, newHandler newHandlerFunc) error

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

type CharmRevisionUpdater Uses

type CharmRevisionUpdater interface {
    UpdateLatestRevisions() (params.ErrorResult, error)
}

CharmRevisionUpdater defines the methods on the charmrevisionupdater API end point.

type CharmRevisionUpdaterAPI Uses

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 Uses

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 Uses

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 Uses

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.

Directories

PathSynopsis
testing

Package charmrevisionupdater imports 13 packages (graph) and is imported by 8 packages. Updated 2019-08-26. Refresh now. Tools for package owners.