juju: github.com/juju/juju/api/undertaker Index | Files

package undertaker

import "github.com/juju/juju/api/undertaker"


Package Files


type Client Uses

type Client struct {
    // contains filtered or unexported fields

Client provides access to the undertaker API

func NewClient Uses

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

NewClient creates a new client for accessing the undertaker API.

func (*Client) ModelInfo Uses

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

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

func (*Client) ProcessDyingModel Uses

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 Uses

func (c *Client) RemoveModel() error

RemoveModel removes any records of this model from Juju.

func (*Client) SetStatus Uses

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

SetStatus sets the status of the model.

func (*Client) WatchModelResources Uses

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

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

type NewWatcherFunc Uses

type NewWatcherFunc func(base.APICaller, params.NotifyWatchResult) watcher.NotifyWatcher

NewWatcherFunc exists to let us test Watch properly.

Package undertaker imports 6 packages (graph) and is imported by 27 packages. Updated 2020-04-25. Refresh now. Tools for package owners.