service

package
v0.0.0-...-a002913 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2015 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package service provides access to the service api facade. This facade contains api calls that are specific to services. As a rule of thumb, if the argument for an api requries a service name and affects only that service then the call belongs here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	base.ClientFacade
	// contains filtered or unexported fields
}

Client allows access to the service API end point.

func NewClient

func NewClient(st api.Connection) *Client

NewClient creates a new client for accessing the service api.

func (*Client) EnvironmentUUID

func (c *Client) EnvironmentUUID() string

EnvironmentUUID returns the environment UUID from the client connection.

func (*Client) ServiceDeploy

func (c *Client) ServiceDeploy(
	charmURL string,
	serviceName string,
	numUnits int,
	configYAML string,
	cons constraints.Value,
	toMachineSpec string,
	placement []*instance.Placement,
	networks []string,
	storage map[string]storage.Constraints,
) error

ServiceDeploy obtains the charm, either locally or from the charm store, and deploys it. It allows the specification of requested networks that must be present on the machines where the service is deployed. Another way to specify networks to include/exclude is using constraints. Placement directives, if provided, specify the machine on which the charm is deployed.

func (*Client) SetMetricCredentials

func (c *Client) SetMetricCredentials(service string, credentials []byte) error

SetMetricCredentials sets the metric credentials for the service specified.

Jump to

Keyboard shortcuts

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