Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) ModelInfo(ctx context.Context) (params.UndertakerModelInfoResult, error)
- func (c *Client) ProcessDyingModel(ctx context.Context) error
- func (c *Client) RemoveModel(ctx context.Context) error
- func (c *Client) WatchModel(ctx context.Context) (watcher.NotifyWatcher, error)
- func (c *Client) WatchModelResources(ctx context.Context) (watcher.NotifyWatcher, error)
- type NewWatcherFunc
- type Option
Constants ¶
This section is empty.
Variables ¶
var WithTracer = base.WithTracer
WithTracer returns an Option that configures the Client to use the supplied tracer.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *cloudspec.CloudSpecAPI *common.ModelConfigWatcher // contains filtered or unexported fields }
Client provides access to the undertaker API
func NewClient ¶
func NewClient(caller base.APICaller, newWatcher NewWatcherFunc, options ...Option) (*Client, error)
NewClient creates a new client for accessing the undertaker API.
func (*Client) ModelInfo ¶
ModelInfo returns information on the model needed by the undertaker worker.
func (*Client) ProcessDyingModel ¶
ProcessDyingModel checks if a dying model has any machines or applications. If there are none, the model's life is changed from dying to dead.
func (*Client) RemoveModel ¶
RemoveModel removes any records of this model from Juju.
func (*Client) WatchModel ¶
WatchModel starts a watcher for changes to the model.
func (*Client) WatchModelResources ¶
WatchModelResources starts a watcher for changes to the model's machines and applications.
type NewWatcherFunc ¶
type NewWatcherFunc func(base.APICaller, params.NotifyWatchResult) watcher.NotifyWatcher
NewWatcherFunc exists to let us test Watch properly.