Documentation
¶
Index ¶
- type CharmInfo
- type Client
- func (c *Client) Charm(application string) (*CharmInfo, error)
- func (c *Client) Life(entityName string) (life.Value, error)
- func (c *Client) Model() (*model.Model, error)
- func (c *Client) RemoveUnit(unitName string) error
- func (c *Client) SetStatus(application string, status status.Status, info string, ...) error
- func (c *Client) SetVersion(appName string, v version.Binary) error
- func (c *Client) Watch(application string) (watcher.NotifyWatcher, error)
- func (c *Client) WatchContainerStart(application string, containerName string) (watcher.StringsWatcher, error)
- func (c *Client) WatchUnits(application string) (watcher.StringsWatcher, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CharmInfo ¶
type CharmInfo struct {
// URL holds the URL of the charm assigned to the
// application.
URL *charm.URL
// ForceUpgrade indicates whether or not application
// units should upgrade to the charm even if they
// are in an error state.
ForceUpgrade bool
// SHA256 holds the SHA256 hash of the charm archive.
SHA256 string
// CharmModifiedVersion increases when the charm changes in some way.
CharmModifiedVersion int
// DeploymentMode is either "operator" or "workload"
DeploymentMode caas.DeploymentMode
}
CharmInfo holds info about the charm for an application.
type Client ¶
type Client struct {
*common.APIAddresser
// contains filtered or unexported fields
}
Client allows access to the CAAS operator API endpoint.
func (*Client) Charm ¶
Charm returns information about the charm currently assigned to the application, including url, force upgrade and sha etc.
func (*Client) Life ¶
Life returns the lifecycle state for the specified CAAS application or unit in the current model.
func (*Client) RemoveUnit ¶
RemoveUnit removes the specified unit from the current model.
func (*Client) SetStatus ¶
func (c *Client) SetStatus( application string, status status.Status, info string, data map[string]interface{}, ) error
SetStatus sets the status of the specified application.
func (*Client) SetVersion ¶
SetVersion sets the tools version associated with the given application.
func (*Client) Watch ¶
func (c *Client) Watch(application string) (watcher.NotifyWatcher, error)
Watch returns a watcher for observing changes to an application.
func (*Client) WatchContainerStart ¶
func (c *Client) WatchContainerStart(application string, containerName string) (watcher.StringsWatcher, error)
WatchContainerStart watchs for Unit starts via the CAAS provider.
func (*Client) WatchUnits ¶
func (c *Client) WatchUnits(application string) (watcher.StringsWatcher, error)
WatchUnits returns a StringsWatcher that notifies of changes to the lifecycles of units of the specified CAAS application in the current model.