juju: github.com/wallyworld/juju/api/caasoperator Index | Files

package caasoperator

import "github.com/wallyworld/juju/api/caasoperator"


Package Files


type CharmInfo Uses

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 Uses

type Client struct {
    // contains filtered or unexported fields

Client allows access to the CAAS operator API endpoint.

func NewClient Uses

func NewClient(caller base.APICaller) *Client

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

func (*Client) Charm Uses

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 Uses

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 Uses

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

Model returns the model entity.

func (*Client) RemoveUnit Uses

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

RemoveUnit removes the specified unit from the current model.

func (*Client) SetStatus Uses

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 Uses

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

SetVersion sets the tools version associated with the given application.

func (*Client) Watch Uses

func (c *Client) Watch(application string) (watcher.NotifyWatcher, error)

Watch returns a watcher for observing changes to an application.

func (*Client) WatchContainerStart Uses

func (c *Client) WatchContainerStart(application string, containerName string) (watcher.StringsWatcher, error)

WatchContainerStart watchs for Unit starts via the CAAS provider.

func (*Client) WatchUnits Uses

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.

Package caasoperator imports 13 packages (graph). Updated 2020-08-11. Refresh now. Tools for package owners.