undertaker

package
v0.0.0-...-57dcc05 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func (c *Client) ProcessDyingModel(ctx context.Context) 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(ctx context.Context) error

RemoveModel removes any records of this model from Juju.

func (*Client) WatchModel

func (c *Client) WatchModel(ctx context.Context) (watcher.NotifyWatcher, error)

WatchModel starts a watcher for changes to the model.

func (*Client) WatchModelResources

func (c *Client) WatchModelResources(ctx context.Context) (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.

type Option

type Option = base.Option

Option is a function that can be used to configure a Client.

Jump to

Keyboard shortcuts

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