Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) ApplicationConfig(applicationName string) (application.ConfigAttributes, error)
- func (c *Client) ApplicationScale(applicationName string) (int, error)
- func (c *Client) Life(entityName string) (life.Value, error)
- func (c *Client) ProvisioningInfo(appName string) (*ProvisioningInfo, error)
- func (c *Client) SetOperatorStatus(appName string, status status.Status, message string, ...) error
- func (c *Client) UpdateApplicationService(arg params.UpdateApplicationServiceArg) error
- func (c *Client) UpdateUnits(arg params.UpdateApplicationUnits) error
- func (c *Client) WatchApplicationScale(application string) (watcher.NotifyWatcher, error)
- func (c *Client) WatchApplications() (watcher.StringsWatcher, error)
- func (c *Client) WatchPodSpec(application string) (watcher.NotifyWatcher, error)
- type ProvisioningInfo
Constants ¶
This section is empty.
Variables ¶
var ErrNoUnits = errors.New("no units to provision")
ErrNoUnits is returned when trying to provision a caas app but there are no units defined in the model.
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 (*Client) ApplicationConfig ¶
func (c *Client) ApplicationConfig(applicationName string) (application.ConfigAttributes, error)
ApplicationConfig returns the config for the specified application.
func (*Client) ApplicationScale ¶
ApplicationScale returns the scale for the specified application.
func (*Client) Life ¶
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 ¶
func (c *Client) UpdateUnits(arg params.UpdateApplicationUnits) error
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 ProvisioningInfo ¶
type ProvisioningInfo struct { PodSpec string Placement string Constraints constraints.Value Filesystems []storage.KubernetesFilesystemParams Devices []devices.KubernetesDeviceParams Tags map[string]string }
ProvisioningInfo holds unit provisioning info.