This section is empty.


This section is empty.


This section is empty.


type Client

type Client struct {
	// contains filtered or unexported fields

Client provides access to the undertaker API

func NewClient

func NewClient(caller base.APICaller, newWatcher NewWatcherFunc) (*Client, error)

NewClient creates a new client for accessing the undertaker API.

func (*Client) ModelInfo

func (c *Client) ModelInfo() (params.UndertakerModelInfoResult, error)

ModelInfo returns information on the model needed by the undertaker worker.

func (*Client) ProcessDyingModel

func (c *Client) ProcessDyingModel() error

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

func (c *Client) RemoveModel() error

RemoveModel removes any records of this model from Juju.

func (*Client) SetStatus

func (c *Client) SetStatus(status status.Status, message string, data map[string]interface{}) error

SetStatus sets the status of the model.

func (*Client) WatchModelResources

func (c *Client) WatchModelResources() (watcher.NotifyWatcher, error)

WatchModelResources starts a watcher for changes to the model's machines and applications.

type NewWatcherFunc

NewWatcherFunc exists to let us test Watch properly.

Source Files