charmdownloader

package
v0.0.0-...-439fd0a Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: AGPL-3.0 Imports: 19 Imported by: 1

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 {
	CharmPendingToBeDownloaded() bool
	SetStatus(status.StatusInfo) error
	CharmOrigin() *corecharm.Origin
	Charm() (Charm, bool, error)
	SetDownloadedIDAndHash(id, hash string) error
}

Application provides an API for querying application-specific details.

type AuthChecker

type AuthChecker interface {
	// AuthController returns true if the entity performing the current API
	// call is a machine acting as a controller.
	AuthController() bool
}

AuthChecker provides an API for checking if the API client is a controller.

type Charm

type Charm interface {
	URL() string
}

Charm provides an API for querying charm details.

type CharmDownloaderAPI

type CharmDownloaderAPI struct {
	// contains filtered or unexported fields
}

CharmDownloaderAPI implements an API for watching the charms collection for any entries that have not been yet downloaded to the blobstore and for triggering their download.

func (*CharmDownloaderAPI) DownloadApplicationCharms

func (a *CharmDownloaderAPI) DownloadApplicationCharms(args params.Entities) (params.ErrorResults, error)

DownloadApplicationCharms iterates the list of provided applications and downloads any referenced charms that have not yet been persisted to the blob store.

func (*CharmDownloaderAPI) WatchApplicationsWithPendingCharms

func (a *CharmDownloaderAPI) WatchApplicationsWithPendingCharms() (params.StringsWatchResult, error)

WatchApplicationsWithPendingCharms registers and returns a watcher instance that reports the ID of applications that reference a charm which has not yet been downloaded.

type Downloader

type Downloader interface {
	DownloadAndStore(charmURL *charm.URL, requestedOrigin corecharm.Origin, force bool) (corecharm.Origin, error)
}

Downloader defines an API for downloading and storing charms.

type ModelBackend

type ModelBackend interface {
	Config() (*config.Config, error)
}

ModelBackend describes an API for accessing model-specific details.

type ResourcesBackend

type ResourcesBackend interface {
	Register(StoppableResource) string
}

ResourcesBackend handles the registration of a stoppable resource and controls its lifecycle.

type StateBackend

type StateBackend interface {
	WatchApplicationsWithPendingCharms() state.StringsWatcher
	ControllerConfig() (controller.Config, error)
	UpdateUploadedCharm(info state.CharmInfo) (services.UploadedCharm, error)
	PrepareCharmUpload(curl string) (services.UploadedCharm, error)
	ModelUUID() string
	Application(string) (Application, error)
}

StateBackend describes an API for accessing/mutating information in state.

type StoppableResource

type StoppableResource interface {
	Stop() error
}

StoppableResource is implemented by resources that can be stopped.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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