Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(cfg ManifoldConfig) dependency.Manifold
Manifold returns a Manifold that encapsulates the charmdownloader worker.
func NewCharmDownloader ¶
NewCharmDownloader returns a new CharmDownloader worker.
Types ¶
type CharmDownloader ¶
type CharmDownloader struct {
// contains filtered or unexported fields
}
CharmDownloader watches applications that reference charms that have not yet been downloaded and triggers an asynchronous download request for each one.
func (*CharmDownloader) Kill ¶
func (cd *CharmDownloader) Kill()
Kill is part of the worker.Worker interface.
func (*CharmDownloader) Wait ¶
func (cd *CharmDownloader) Wait() error
Wait is part of the worker.Worker interface.
type CharmDownloaderAPI ¶
type CharmDownloaderAPI interface { WatchApplicationsWithPendingCharms() (watcher.StringsWatcher, error) DownloadApplicationCharms(applications []names.ApplicationTag) error }
CharmDownloaderAPI describes the API exposed by the charm downloader facade.
type Config ¶
type Config struct { Logger Logger CharmDownloaderAPI CharmDownloaderAPI }
Config defines the operation of a Worker.
type Logger ¶
type Logger interface { Tracef(string, ...interface{}) Debugf(string, ...interface{}) Warningf(string, ...interface{}) Infof(string, ...interface{}) Errorf(string, ...interface{}) Criticalf(string, ...interface{}) }
Logger represents the methods used by the worker to log details.
type ManifoldConfig ¶
type ManifoldConfig struct { APICallerName string Logger Logger // A constructor for the charmdownloader API which can be overridden // during testing. If omitted, the default client for the charmdownloader // facade will be automatically used. NewCharmDownloaderAPI func(base.APICaller) CharmDownloaderAPI }
ManifoldConfig describes the resources used by the charmdownloader worker.
func (ManifoldConfig) Validate ¶
func (cfg ManifoldConfig) Validate() error
Validate is called by start to check for bad configuration.