Documentation

Index

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 NewClient

      func NewClient(caller base.APICaller) *Client

        NewClient returns a client used to access the CAAS Operator API.

        func (*Client) Charm

        func (c *Client) Charm(application string) (*CharmInfo, error)

          Charm returns information about the charm currently assigned to the application, including url, force upgrade and sha etc.

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

            func (c *Client) Model() (*model.Model, error)

              Model returns the model entity.

              func (*Client) RemoveUnit

              func (c *Client) RemoveUnit(unitName string) error

                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

                  func (c *Client) SetVersion(appName string, v version.Binary) error

                    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.

                          Source Files