Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) ApplicationOCIResources(ctx context.Context, appName string) (map[string]resource.DockerImageDetails, error)
- func (c *Client) ClearApplicationResources(ctx context.Context, appName string) error
- func (c *Client) DestroyUnits(ctx context.Context, unitNames []string) error
- func (c *Client) Life(ctx context.Context, entityName string) (life.Value, error)
- func (c *Client) ProvisionerConfig(ctx context.Context) (params.CAASApplicationProvisionerConfig, error)
- func (c *Client) ProvisioningInfo(ctx context.Context, applicationName string) (ProvisioningInfo, error)
- func (c *Client) ProvisioningState(ctx context.Context, appName string) (*params.CAASApplicationProvisioningState, error)
- func (c *Client) RemoveUnit(ctx context.Context, unitName string) error
- func (c *Client) SetOperatorStatus(ctx context.Context, appName string, status status.Status, message string, ...) error
- func (c *Client) SetPassword(ctx context.Context, appName string, password string) error
- func (c *Client) SetProvisioningState(ctx context.Context, appName string, ...) error
- func (c *Client) Units(ctx context.Context, appName string) ([]params.CAASUnit, error)
- func (c *Client) UpdateUnits(ctx context.Context, arg params.UpdateApplicationUnits) (*params.UpdateApplicationUnitsInfo, error)
- func (c *Client) WatchApplication(ctx context.Context, appName string) (watcher.NotifyWatcher, error)
- func (c *Client) WatchApplications(ctx context.Context) (watcher.StringsWatcher, error)
- func (c *Client) WatchProvisioningInfo(ctx context.Context, applicationName string) (watcher.NotifyWatcher, error)
- func (c *Client) WatchUnits(ctx context.Context, application string) (watcher.StringsWatcher, error)
- type Option
- type ProvisioningInfo
Constants ¶
This section is empty.
Variables ¶
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 { *charmscommon.CharmInfoClient *charmscommon.ApplicationCharmInfoClient // contains filtered or unexported fields }
Client allows access to the CAAS application provisioner API endpoint.
func (*Client) ApplicationOCIResources ¶
func (c *Client) ApplicationOCIResources(ctx context.Context, appName string) (map[string]resource.DockerImageDetails, error)
ApplicationOCIResources returns all the OCI image resources for an application.
func (*Client) ClearApplicationResources ¶
ClearApplicationResources clears the flag which indicates an application still has resources in the cluster.
func (*Client) DestroyUnits ¶
DestroyUnits is responsible for starting the process of destroying units associated with this application.
func (*Client) Life ¶
Life returns the lifecycle state for the specified application or unit in the current model.
func (*Client) ProvisionerConfig ¶
func (c *Client) ProvisionerConfig(ctx context.Context) (params.CAASApplicationProvisionerConfig, error)
ProvisionerConfig returns the provisioner's configuration.
func (*Client) ProvisioningInfo ¶
func (c *Client) ProvisioningInfo(ctx context.Context, applicationName string) (ProvisioningInfo, error)
ProvisioningInfo returns the info needed to provision an operator for an application.
func (*Client) ProvisioningState ¶
func (c *Client) ProvisioningState(ctx context.Context, appName string) (*params.CAASApplicationProvisioningState, error)
ProvisioningState returns the current provisioning state for the CAAS application. The result can be nil.
func (*Client) RemoveUnit ¶
RemoveUnit removes the specified unit from the current model.
func (*Client) SetOperatorStatus ¶
func (c *Client) SetOperatorStatus(ctx context.Context, appName string, status status.Status, message string, data map[string]interface{}) error
SetOperatorStatus updates the provisioning status of an operator.
func (*Client) SetPassword ¶
SetPassword sets API password for the specified application.
func (*Client) SetProvisioningState ¶
func (c *Client) SetProvisioningState(ctx context.Context, appName string, state params.CAASApplicationProvisioningState) error
SetProvisioningState sets the provisioning state for the CAAS application.
func (*Client) UpdateUnits ¶
func (c *Client) UpdateUnits(ctx context.Context, arg params.UpdateApplicationUnits) (*params.UpdateApplicationUnitsInfo, error)
UpdateUnits updates the state model to reflect the state of the units as reported by the cloud.
func (*Client) WatchApplication ¶
func (c *Client) WatchApplication(ctx context.Context, appName string) (watcher.NotifyWatcher, error)
WatchApplication returns a NotifyWatcher that notifies of changes to the application in the current model.
func (*Client) WatchApplications ¶
WatchApplications returns a StringsWatcher that notifies of changes to the lifecycles of CAAS applications in the current model.
func (*Client) WatchProvisioningInfo ¶
func (*Client) WatchUnits ¶
func (c *Client) WatchUnits(ctx context.Context, application string) (watcher.StringsWatcher, error)
WatchUnits returns a StringsWatcher that notifies of changes to the lifecycles of units of the specified application in the current model.
type ProvisioningInfo ¶
type ProvisioningInfo struct { Version version.Number APIAddresses []string CACert string Tags map[string]string Constraints constraints.Value Filesystems []storage.KubernetesFilesystemParams Devices []devices.KubernetesDeviceParams Base corebase.Base ImageDetails resource.DockerImageDetails CharmModifiedVersion int CharmURL *charm.URL Trust bool Scale int }
ProvisioningInfo holds the info needed to provision an operator.