charmrevisionupdater

package
v0.0.0-...-a0d7459 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2017 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewCharmStoreClient = func(st *state.State) (charmstore.Client, error) {
	return charmstore.NewCachingClient(state.MacaroonCache{st}, nil)
}

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

Functions

func RegisterLatestCharmHandler

func RegisterLatestCharmHandler(name string, newHandler newHandlerFunc) error

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL