caasapplication

package
v0.0.0-...-0a82276 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 5 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 {
	base.ClientFacade
	// contains filtered or unexported fields
}

Client allows access to the CAAS operator API endpoint.

func NewClient

func NewClient(caller base.APICallCloser, options ...Option) *Client

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

func (*Client) UnitIntroduction

func (c *Client) UnitIntroduction(ctx context.Context, podName string, podUUID string) (*UnitConfig, error)

UnitIntroduction introduces the unit and returns an agent config.

func (*Client) UnitTerminating

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

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

type Option

type Option = base.Option

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

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