caasunitprovisioner

package
v0.0.0-...-9ec3720 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: AGPL-3.0 Imports: 13 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 {
	// contains filtered or unexported fields
}

Client allows access to the CAAS unit provisioner API endpoint.

func NewClient

func NewClient(caller base.APICaller) *Client

NewClient returns a client used to access the CAAS unit provisioner API.

func (*Client) ApplicationConfig

func (c *Client) ApplicationConfig(applicationName string) (application.ConfigAttributes, error)

ApplicationConfig returns the config for the specified application.

func (*Client) ApplicationScale

func (c *Client) ApplicationScale(applicationName string) (int, error)

ApplicationScale returns the scale for the specified application.

func (*Client) ClearApplicationResources

func (c *Client) ClearApplicationResources(appName string) error

ClearApplicationResources clears the flag which indicates an application still has resources in the cluster.

func (*Client) DeploymentMode

func (c *Client) DeploymentMode(applicationName string) (caas.DeploymentMode, error)

DeploymentMode returns the deployment mode for the specified application's charm.

func (*Client) Life

func (c *Client) Life(entityName string) (life.Value, error)

Life returns the lifecycle state for the specified CAAS application or unit in the current model.

func (*Client) ProvisioningInfo

func (c *Client) ProvisioningInfo(appName string) (*ProvisioningInfo, error)

ProvisioningInfo returns the provisioning info for the specified CAAS application in the current model.

func (*Client) SetOperatorStatus

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

SetOperatorStatus updates the provisioning status of an operator.

func (*Client) UpdateApplicationService

func (c *Client) UpdateApplicationService(arg params.UpdateApplicationServiceArg) error

UpdateApplicationService updates the state model to reflect the state of the application's service as reported by the cloud.

func (*Client) UpdateUnits

UpdateUnits updates the state model to reflect the state of the units as reported by the cloud.

func (*Client) WatchApplicationScale

func (c *Client) WatchApplicationScale(application string) (watcher.NotifyWatcher, error)

WatchApplicationScale returns a NotifyWatcher that notifies of changes to the lifecycles of units of the specified CAAS application in the current model.

func (*Client) WatchApplications

func (c *Client) WatchApplications() (watcher.StringsWatcher, error)

WatchApplications returns a StringsWatcher that notifies of changes to the lifecycles of CAAS applications in the current model.

func (*Client) WatchPodSpec

func (c *Client) WatchPodSpec(application string) (watcher.NotifyWatcher, error)

WatchPodSpec returns a NotifyWatcher that notifies of changes to the pod spec of the specified CAAS application in the current model.

type DeploymentInfo

type DeploymentInfo struct {
	DeploymentType string
	ServiceType    string
}

DeploymentInfo holds deployment info from charm metadata.

type ProvisioningInfo

type ProvisioningInfo struct {
	DeploymentInfo       DeploymentInfo
	PodSpec              string
	RawK8sSpec           string
	Constraints          constraints.Value
	Filesystems          []storage.KubernetesFilesystemParams
	Devices              []devices.KubernetesDeviceParams
	Tags                 map[string]string
	OperatorImagePath    string
	CharmModifiedVersion int
}

ProvisioningInfo holds unit provisioning info.

Jump to

Keyboard shortcuts

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