caasunitprovisioner

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 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) 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

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.

Jump to

Keyboard shortcuts

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