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) ApplicationTrust

func (c *Client) ApplicationTrust(applicationName string) (bool, error)

ApplicationTrust returns the trust value 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) WatchApplicationTrustHash

func (c *Client) WatchApplicationTrustHash(application string) (watcher.StringsWatcher, error)

WatchApplicationTrustHash returns a StringsWatcher that notifies of changes to the application's trust hash.

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.

Source Files