caasapplication

package
v0.0.0-...-51a0f74 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	base.ClientFacade
	// contains filtered or unexported fields
}

Client allows access to the CAAS operator API endpoint.

func NewClient

func NewClient(caller base.APICallCloser) *Client

NewClient returns a client used to access the CAAS Operator API.

func (*Client) UnitIntroduction

func (c *Client) UnitIntroduction(podName string, podUUID string) (*UnitConfig, error)

UnitIntroduction introduces the unit and returns an agent config.

func (*Client) UnitTerminating

func (c *Client) UnitTerminating(unit names.UnitTag) (UnitTermination, error)

UnitTerminating is to be called by the CAASUnitTerminationWorker when the uniter is shutting down.

type UnitConfig

type UnitConfig struct {
	UnitTag   names.UnitTag
	AgentConf []byte
}

type UnitTermination

type UnitTermination struct {
	// WillRestart is true when the unit agent should restart.
	// It will be false when the unit is dying and should shutdown normally.
	WillRestart bool
}

UnitTermination holds the result from calling UnitTerminating.

Jump to

Keyboard shortcuts

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