params

package
v0.0.0-...-65247a5 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2014 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeNotFound            = "not found"
	CodeUnauthorized        = "unauthorized access"
	CodeCannotEnterScope    = "cannot enter scope"
	CodeCannotEnterScopeYet = "cannot enter scope yet"
	CodeExcessiveContention = "excessive contention"
	CodeUnitHasSubordinates = "unit has subordinates"
	CodeNotAssigned         = "not assigned"
	CodeStopped             = "stopped"
	CodeHasAssignedUnits    = "machine has assigned units"
	CodeNotProvisioned      = "not provisioned"
	CodeNoAddressSet        = "no address set"
	CodeNotImplemented      = rpc.CodeNotImplemented
)

The Code constants hold error codes for some kinds of error.

Variables

This section is empty.

Functions

func ClientError

func ClientError(err error) error

clientError maps errors returned from an RPC call into local errors with appropriate values.

func ErrCode

func ErrCode(err error) string

ErrCode returns the error code associated with the given error, or the empty string if there is none.

func IsCodeCannotEnterScope

func IsCodeCannotEnterScope(err error) bool

func IsCodeCannotEnterScopeYet

func IsCodeCannotEnterScopeYet(err error) bool

func IsCodeExcessiveContention

func IsCodeExcessiveContention(err error) bool

func IsCodeHasAssignedUnits

func IsCodeHasAssignedUnits(err error) bool

func IsCodeNoAddressSet

func IsCodeNoAddressSet(err error) bool

func IsCodeNotAssigned

func IsCodeNotAssigned(err error) bool

func IsCodeNotFound

func IsCodeNotFound(err error) bool

func IsCodeNotFoundOrCodeUnauthorized

func IsCodeNotFoundOrCodeUnauthorized(err error) bool

IsCodeNotFoundOrCodeUnauthorized is used in API clients which, pre-API, used IsNotFoundErr; this is because an API client is not necessarily privileged to know about the existence or otherwise of a particular entity, and the server may hence convert NotFound to Unauthorized at its discretion.

func IsCodeNotImplemented

func IsCodeNotImplemented(err error) bool

func IsCodeNotProvisioned

func IsCodeNotProvisioned(err error) bool

func IsCodeStopped

func IsCodeStopped(err error) bool

func IsCodeUnauthorized

func IsCodeUnauthorized(err error) bool

func IsCodeUnitHasSubordinates

func IsCodeUnitHasSubordinates(err error) bool

Types

type AddMachineParams

type AddMachineParams struct {
	// The following fields hold attributes that will be given to the
	// new machine when it is created.
	Series      string
	Constraints constraints.Value
	Jobs        []MachineJob

	// If ParentId is non-empty, it specifies the id of the
	// parent machine within which the new machine will
	// be created. In that case, ContainerType must also be
	// set.
	ParentId string

	// ContainerType optionally gives the container type of the
	// new machine. If it is non-empty, the new machine
	// will be implemented by a container. If it is specified
	// but ParentId is empty, a new top level machine will
	// be created to hold the container with given series,
	// constraints and jobs.
	ContainerType instance.ContainerType

	// If InstanceId is non-empty, it will be associated with
	// the new machine along with the given nonce,
	// hardware characteristics and addresses.
	// All the following fields will be ignored if ContainerType
	// is set.
	InstanceId              instance.Id
	Nonce                   string
	HardwareCharacteristics instance.HardwareCharacteristics
	Addrs                   []instance.Address
}

AddMachineParams encapsulates the parameters used to create a new machine.

type AddMachines

type AddMachines struct {
	MachineParams []AddMachineParams
}

AddMachines holds the parameters for making the AddMachines call.

type AddMachinesResult

type AddMachinesResult struct {
	Machine string
	Error   *Error
}

AddMachinesResults holds the name of a machine added by the state.api.client.AddMachine call for a single machine.

type AddMachinesResults

type AddMachinesResults struct {
	Machines []AddMachinesResult
}

AddMachinesResults holds the results of an AddMachines call.

type AddRelation

type AddRelation struct {
	Endpoints []string
}

AddRelation holds the parameters for making the AddRelation call. The endpoints specified are unordered.

type AddRelationResults

type AddRelationResults struct {
	Endpoints map[string]charm.Relation
}

AddRelationResults holds the results of a AddRelation call. The Endpoints field maps service names to the involved endpoints.

type AddServiceUnits

type AddServiceUnits struct {
	ServiceName   string
	NumUnits      int
	ToMachineSpec string
}

AddServiceUnits holds parameters for the AddUnits call.

type AddServiceUnitsResults

type AddServiceUnitsResults struct {
	Units []string
}

AddServiceUnitsResults holds the names of the units added by the AddServiceUnits call.

type AgentGetEntitiesResult

type AgentGetEntitiesResult struct {
	Life          Life
	Jobs          []MachineJob
	ContainerType instance.ContainerType
	Error         *Error
}

AgentGetEntitiesResult holds the results of a machineagent.API.GetEntities call for a single entity.

type AgentGetEntitiesResults

type AgentGetEntitiesResults struct {
	Entities []AgentGetEntitiesResult
}

AgentGetEntitiesResults holds the results of a agent.API.GetEntities call.

type AllWatcherId

type AllWatcherId struct {
	AllWatcherId string
}

AllWatcherId holds the id of an AllWatcher.

type AllWatcherNextResults

type AllWatcherNextResults struct {
	Deltas []Delta
}

AllWatcherNextResults holds deltas returned from calling AllWatcher.Next().

type AnnotationInfo

type AnnotationInfo struct {
	Tag         string
	Annotations map[string]string
}

func (*AnnotationInfo) EntityId

func (i *AnnotationInfo) EntityId() EntityId

type BoolResult

type BoolResult struct {
	Error  *Error
	Result bool
}

BoolResult holds the result of an API call that returns a a boolean or an error.

type BoolResults

type BoolResults struct {
	Results []BoolResult
}

BoolResults holds multiple results with BoolResult each.

type BytesResult

type BytesResult struct {
	Result []byte
}

BytesResult holds the result of an API call that returns a slice of bytes.

type CharmArchiveURLResult

type CharmArchiveURLResult struct {
	Error                          *Error
	Result                         string
	DisableSSLHostnameVerification bool
}

CharmArchiveURLResult holds a charm archive (bundle) URL, a DisableSSLHostnameVerification flag or an error.

type CharmArchiveURLResults

type CharmArchiveURLResults struct {
	Results []CharmArchiveURLResult
}

CharmArchiveURLResults holds the bulk operation result of an API call that returns a charm archive (bundle) URL, a DisableSSLHostnameVerification flag or an error.

type CharmInfo

type CharmInfo struct {
	CharmURL string
}

CharmInfo stores parameters for a CharmInfo call.

type CharmURL

type CharmURL struct {
	URL string
}

CharmURL identifies a single charm URL.

type CharmURLs

type CharmURLs struct {
	URLs []CharmURL
}

CharmURLs identifies multiple charm URLs.

type CharmsResponse

type CharmsResponse struct {
	Error    string   `json:",omitempty"`
	CharmURL string   `json:",omitempty"`
	Files    []string `json:",omitempty"`
}

CharmsResponse is the server response to charm upload or GET requests.

type ConfigSettings

type ConfigSettings map[string]interface{}

ConfigSettings holds unit, service or cham configuration settings with string keys and arbitrary values.

type ConfigSettingsResult

type ConfigSettingsResult struct {
	Error    *Error
	Settings ConfigSettings
}

ConfigSettingsResult holds a configuration map or an error.

type ConfigSettingsResults

type ConfigSettingsResults struct {
	Results []ConfigSettingsResult
}

ConfigSettingsResults holds multiple configuration maps or errors.

type ConstraintsResult

type ConstraintsResult struct {
	Error       *Error
	Constraints constraints.Value
}

ConstraintsResult holds machine constraints or an error.

type ConstraintsResults

type ConstraintsResults struct {
	Results []ConstraintsResult
}

ConstraintsResults holds multiple constraints results.

type ContainerConfig

type ContainerConfig struct {
	ProviderType            string
	AuthorizedKeys          string
	SSLHostnameVerification bool
	Proxy                   osenv.ProxySettings
	AptProxy                osenv.ProxySettings
}

ContainerConfig contains information from the environment config that is needed for container cloud-init.

type Creds

type Creds struct {
	AuthTag  string
	Password string
	Nonce    string
}

Creds holds credentials for identifying an entity.

type Delta

type Delta struct {
	// If Removed is true, the entity has been removed;
	// otherwise it has been created or changed.
	Removed bool
	// Entity holds data about the entity that has changed.
	Entity EntityInfo
}

Delta holds details of a change to the environment.

func (*Delta) MarshalJSON

func (d *Delta) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Delta) UnmarshalJSON

func (d *Delta) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

type DeployerConnectionValues

type DeployerConnectionValues struct {
	StateAddresses []string
	APIAddresses   []string
}

DeployerConnectionValues containers the result of deployer.ConnectionInfo API call.

type DestroyMachines

type DestroyMachines struct {
	MachineNames []string
	Force        bool
}

DestroyMachines holds parameters for the DestroyMachines call.

type DestroyRelation

type DestroyRelation struct {
	Endpoints []string
}

DestroyRelation holds the parameters for making the DestroyRelation call. The endpoints specified are unordered.

type DestroyServiceUnits

type DestroyServiceUnits struct {
	UnitNames []string
}

DestroyServiceUnits holds parameters for the DestroyUnits call.

type Endpoint

type Endpoint struct {
	ServiceName string
	Relation    charm.Relation
}

type Entities

type Entities struct {
	Entities []Entity
}

Entities identifies multiple entities.

type EntitiesCharmURL

type EntitiesCharmURL struct {
	Entities []EntityCharmURL
}

EntitiesCharmURL holds the parameters for making a SetCharmURL API call.

type EntitiesPorts

type EntitiesPorts struct {
	Entities []EntityPort
}

EntitiesPorts holds the parameters for making an OpenPort or ClosePort on some entities.

type EntitiesVersion

type EntitiesVersion struct {
	AgentTools []EntityVersion
}

EntitiesVersion specifies what tools are being run for multiple entities.

type Entity

type Entity struct {
	Tag string
}

Entity identifies a single entity.

type EntityCharmURL

type EntityCharmURL struct {
	Tag      string
	CharmURL string
}

EntityCharmURL holds an entity's tag and a charm URL.

type EntityId

type EntityId struct {
	Kind string
	Id   interface{}
}

type EntityInfo

type EntityInfo interface {
	// EntityId returns an identifier that will uniquely
	// identify the entity within its kind
	EntityId() EntityId
}

EntityInfo is implemented by all entity Info types.

type EntityPort

type EntityPort struct {
	Tag      string
	Protocol string
	Port     int
}

EntityPort holds an entity's tag, a protocol and a port.

type EntityVersion

type EntityVersion struct {
	Tag   string
	Tools *Version
}

EntityVersion specifies the tools version to be set for an entity with the given tag. version.Binary directly.

type EnvironConfig

type EnvironConfig map[string]interface{}

EnvironConfig holds an environment configuration.

type EnvironConfigResult

type EnvironConfigResult struct {
	Error  *Error
	Config EnvironConfig
}

EnvironConfigResult holds environment configuration or an error.

type EnvironmentGetResults

type EnvironmentGetResults struct {
	Config map[string]interface{}
}

EnvironmentGetResults contains the result of EnvironmentGet client API call.

type EnvironmentResult

type EnvironmentResult struct {
	Error *Error
	Name  string
	UUID  string
}

EnvironmentResult holds the result of an API call returning a name and UUID for an environment.

type EnvironmentSet

type EnvironmentSet struct {
	Config map[string]interface{}
}

EnvironmentSet contains the arguments for EnvironmentSet client API call.

type Error

type Error struct {
	Message string
	Code    string
}

Error is the type of error returned by any call to the state API

func (*Error) Error

func (e *Error) Error() string

func (*Error) ErrorCode

func (e *Error) ErrorCode() string

func (Error) GoString

func (e Error) GoString() string

GoString implements fmt.GoStringer. It means that a *Error shows its contents correctly when printed with %#v.

type ErrorResult

type ErrorResult struct {
	Error *Error
}

ErrorResult holds the error status of a single operation.

type ErrorResults

type ErrorResults struct {
	// Results contains the error results from each operation.
	Results []ErrorResult
}

ErrorResults holds the results of calling a bulk operation which returns no data, only an error result. The order and number of elements matches the operations specified in the request.

func (ErrorResults) OneError

func (result ErrorResults) OneError() error

OneError returns the error from the result of a bulk operation on a single value.

type FindToolsParams

type FindToolsParams struct {
	MajorVersion int
	MinorVersion int
	Arch         string
	Series       string
}

FindToolsParams defines parameters for the FindTools method.

type FindToolsResults

type FindToolsResults struct {
	List  tools.List
	Error *Error
}

FindToolsResults holds a list of tools from FindTools and any error.

type GetAnnotations

type GetAnnotations struct {
	Tag string
}

GetAnnotations stores parameters for making the GetAnnotations call.

type GetAnnotationsResults

type GetAnnotationsResults struct {
	Annotations map[string]string
}

GetAnnotationsResults holds annotations associated with an entity.

type GetConstraintsResults

type GetConstraintsResults struct {
	Constraints constraints.Value
}

GetConstraintsResults holds results of the GetConstraints call.

type GetServiceConstraints

type GetServiceConstraints struct {
	ServiceName string
}

GetServiceConstraints stores parameters for making the GetServiceConstraints call.

type Life

type Life string

Life describes the lifecycle state of an entity ("alive", "dying" or "dead").

const (
	Alive Life = "alive"
	Dying Life = "dying"
	Dead  Life = "dead"
)

type LifeResult

type LifeResult struct {
	Life  Life
	Error *Error
}

LifeResult holds the life status of a single entity, or an error indicating why it is not available.

type LifeResults

type LifeResults struct {
	Results []LifeResult
}

LifeResults holds the life or error status of multiple entities.

type ListSSHKeys

type ListSSHKeys struct {
	Entities
	Mode ssh.ListMode
}

ListSSHKeys stores parameters used for a KeyManager.ListKeys call.

type MachineAddresses

type MachineAddresses struct {
	Tag       string
	Addresses []instance.Address
}

MachineAddresses holds an machine tag and addresses.

type MachineContainers

type MachineContainers struct {
	MachineTag     string
	ContainerTypes []instance.ContainerType
}

MachineContainers holds the arguments for making an SetSupportedContainers call on a given machine.

type MachineContainersParams

type MachineContainersParams struct {
	Params []MachineContainers
}

MachineContainersParams holds the arguments for making a SetSupportedContainers API call.

type MachineInfo

type MachineInfo struct {
	Id         string `bson:"_id"`
	InstanceId string
	Status     Status
	StatusInfo string
	StatusData StatusData
}

MachineInfo holds the information about a Machine that is watched by StateWatcher.

func (*MachineInfo) EntityId

func (i *MachineInfo) EntityId() EntityId

type MachineJob

type MachineJob string

MachineJob values define responsibilities that machines may be expected to fulfil.

const (
	JobHostUnits     MachineJob = "JobHostUnits"
	JobManageEnviron MachineJob = "JobManageEnviron"
	// Deprecated in 1.18
	JobManageStateDeprecated MachineJob = "JobManageState"
)

func (MachineJob) NeedsState

func (job MachineJob) NeedsState() bool

NeedsState returns true if the job requires a state connection.

type MachineSetProvisioned

type MachineSetProvisioned struct {
	Tag             string
	InstanceId      instance.Id
	Nonce           string
	Characteristics *instance.HardwareCharacteristics
}

MachineSetProvisioned holds a machine tag, provider-specific instance id, a nonce, or an error.

type ModifyUserSSHKeys

type ModifyUserSSHKeys struct {
	User string
	Keys []string
}

ModifySSHKeys stores parameters used for a KeyManager.Add|Delete|Import call for a user.

type NotifyWatchResult

type NotifyWatchResult struct {
	NotifyWatcherId string
	Error           *Error
}

NotifyWatchResult holds a NotifyWatcher id and an error (if any).

type NotifyWatchResults

type NotifyWatchResults struct {
	Results []NotifyWatchResult
}

NotifyWatchResults holds the results for any API call which ends up returning a list of NotifyWatchers

type PasswordChange

type PasswordChange struct {
	Tag      string
	Password string
}

PasswordChange specifies a password change for the entity with the given tag.

type PasswordChanges

type PasswordChanges struct {
	Changes []PasswordChange
}

PasswordChanges holds the parameters for making a SetPasswords call.

type PortsResult

type PortsResult struct {
	Error *Error
	Ports []instance.Port
}

PortsResult holds the result of an API call that returns a slice of instance.Port or an error.

type PortsResults

type PortsResults struct {
	Results []PortsResult
}

PortsResults holds the bulk operation result of an API call that returns a slice of instance.Port.

type ProvisioningScriptParams

type ProvisioningScriptParams struct {
	MachineId string
	Nonce     string

	// DataDir may be "", in which case the default will be used.
	DataDir string

	// DisablePackageCommands may be set to disable all package-related
	// commands. It is then the responsibility of the provisioner to
	// ensure that all the packages required by Juju are available.
	DisablePackageCommands bool
}

ProvisioningScriptParams contains the parameters for the ProvisioningScript client API call.

type ProvisioningScriptResult

type ProvisioningScriptResult struct {
	Script string
}

ProvisioningScriptResult contains the result of the ProvisioningScript client API call.

type PublicAddress

type PublicAddress struct {
	Target string
}

PublicAddress holds parameters for the PublicAddress call.

type PublicAddressResults

type PublicAddressResults struct {
	PublicAddress string
}

PublicAddressResults holds results of the PublicAddress call.

type RelationIds

type RelationIds struct {
	RelationIds []int
}

RelationIds holds multiple relation ids.

type RelationInfo

type RelationInfo struct {
	Key       string `bson:"_id"`
	Id        int
	Endpoints []Endpoint
}

func (*RelationInfo) EntityId

func (i *RelationInfo) EntityId() EntityId

type RelationResult

type RelationResult struct {
	Error    *Error
	Life     Life
	Id       int
	Key      string
	Endpoint Endpoint
}

RelationResult returns information about a single relation, or an error.

type RelationResults

type RelationResults struct {
	Results []RelationResult
}

RelationResults holds the result of an API call that returns information about multiple relations.

type RelationSettings

type RelationSettings map[string]string

RelationSettings holds relation settings names and values.

type RelationSettingsResult

type RelationSettingsResult struct {
	Error    *Error
	Settings RelationSettings
}

RelationSettingsResult holds a relation settings map or an error.

type RelationSettingsResults

type RelationSettingsResults struct {
	Results []RelationSettingsResult
}

RelationSettingsResults holds the result of an API calls that returns settings for multiple relations.

type RelationUnit

type RelationUnit struct {
	Relation string
	Unit     string
}

RelationUnit holds a relation and a unit tag.

type RelationUnitPair

type RelationUnitPair struct {
	Relation   string
	LocalUnit  string
	RemoteUnit string
}

RelationUnitPair holds a relation tag, a local and remote unit tags.

type RelationUnitPairs

type RelationUnitPairs struct {
	RelationUnitPairs []RelationUnitPair
}

RelationUnitPairs holds the parameters for API calls expecting multiple sets of a relation tag, a local and remote unit tags.

type RelationUnitSettings

type RelationUnitSettings struct {
	Relation string
	Unit     string
	Settings RelationSettings
}

RelationUnitSettings holds a relation tag, a unit tag and local unit settings.

type RelationUnits

type RelationUnits struct {
	RelationUnits []RelationUnit
}

RelationUnits holds the parameters for API calls expecting a pair of relation and unit tags.

type RelationUnitsChange

type RelationUnitsChange struct {
	Changed  map[string]UnitSettings
	Departed []string
}

RelationUnitsChange holds notifications of units entering and leaving the scope of a RelationUnit, and changes to the settings of those units known to have entered.

When remote units first enter scope and then when their settings change, the changes will be noted in the Changed field, which holds the unit settings for every such unit, indexed by the unit id.

When remote units leave scope, their ids will be noted in the Departed field, and no further events will be sent for those units.

type RelationUnitsSettings

type RelationUnitsSettings struct {
	RelationUnits []RelationUnitSettings
}

RelationUnitsSettings holds the arguments for making a EnterScope or WriteSettings API calls.

type RelationUnitsWatchResult

type RelationUnitsWatchResult struct {
	RelationUnitsWatcherId string
	Changes                RelationUnitsChange
	Error                  *Error
}

RelationUnitsWatchResult holds a RelationUnitsWatcher id, changes and an error (if any).

type RelationUnitsWatchResults

type RelationUnitsWatchResults struct {
	Results []RelationUnitsWatchResult
}

RelationUnitsWatchResults holds the results for any API call which ends up returning a list of RelationUnitsWatchers.

type Resolved

type Resolved struct {
	UnitName string
	Retry    bool
}

Resolved holds parameters for the Resolved call.

type ResolvedMode

type ResolvedMode string

ResolvedMode describes the way state transition errors are resolved.

const (
	ResolvedNone       ResolvedMode = ""
	ResolvedRetryHooks ResolvedMode = "retry-hooks"
	ResolvedNoHooks    ResolvedMode = "no-hooks"
)

type ResolvedModeResult

type ResolvedModeResult struct {
	Error *Error
	Mode  ResolvedMode
}

ResolvedModeResult holds a resolved mode or an error.

type ResolvedModeResults

type ResolvedModeResults struct {
	Results []ResolvedModeResult
}

ResolvedModeResults holds the bulk operation result of an API call that returns a resolved mode or an error.

type ResolvedResults

type ResolvedResults struct {
	Service  string
	Charm    string
	Settings map[string]interface{}
}

ResolvedResults holds results of the Resolved call.

type RunParams

type RunParams struct {
	Commands string
	Timeout  time.Duration
	Machines []string
	Services []string
	Units    []string
}

RunParams is used to provide the parameters to the Run method. Commands and Timeout are expected to have values, and one or more values should be in the Machines, Services, or Units slices.

type RunResult

type RunResult struct {
	exec.ExecResponse
	MachineId string
	UnitId    string
	Error     string
}

RunResult contains the result from an individual run call on a machine. UnitId is populated if the command was run inside the unit context.

type RunResults

type RunResults struct {
	Results []RunResult
}

RunResults is used to return the slice of results. Api server side calls need to return single structure values.

type ServiceCharmRelations

type ServiceCharmRelations struct {
	ServiceName string
}

ServiceCharmRelations holds parameters for making the ServiceCharmRelations call.

type ServiceCharmRelationsResults

type ServiceCharmRelationsResults struct {
	CharmRelations []string
}

ServiceCharmRelationsResults holds the results of the ServiceCharmRelations call.

type ServiceDeploy

type ServiceDeploy struct {
	ServiceName   string
	CharmUrl      string
	NumUnits      int
	Config        map[string]string
	ConfigYAML    string // Takes precedence over config if both are present.
	Constraints   constraints.Value
	ToMachineSpec string
}

ServiceDeploy holds the parameters for making the ServiceDeploy call.

type ServiceDestroy

type ServiceDestroy struct {
	ServiceName string
}

ServiceDestroy holds the parameters for making the ServiceDestroy call.

type ServiceExpose

type ServiceExpose struct {
	ServiceName string
}

ServiceExpose holds the parameters for making the ServiceExpose call.

type ServiceGet

type ServiceGet struct {
	ServiceName string
}

ServiceGet holds parameters for making the ServiceGet or ServiceGetCharmURL calls.

type ServiceGetResults

type ServiceGetResults struct {
	Service     string
	Charm       string
	Config      map[string]interface{}
	Constraints constraints.Value
}

ServiceGetResults holds results of the ServiceGet call.

type ServiceInfo

type ServiceInfo struct {
	Name        string `bson:"_id"`
	Exposed     bool
	CharmURL    string
	OwnerTag    string
	Life        Life
	MinUnits    int
	Constraints constraints.Value
	Config      map[string]interface{}
}

func (*ServiceInfo) EntityId

func (i *ServiceInfo) EntityId() EntityId

type ServiceSet

type ServiceSet struct {
	ServiceName string
	Options     map[string]string
}

ServiceSet holds the parameters for a ServiceSet command. Options contains the configuration data.

type ServiceSetCharm

type ServiceSetCharm struct {
	ServiceName string
	CharmUrl    string
	Force       bool
}

ServiceSetCharm sets the charm for a given service.

type ServiceSetYAML

type ServiceSetYAML struct {
	ServiceName string
	Config      string
}

ServiceSetYAML holds the parameters for a ServiceSetYAML command. Config contains the configuration data in YAML format.

type ServiceUnexpose

type ServiceUnexpose struct {
	ServiceName string
}

ServiceUnexpose holds parameters for the ServiceUnexpose call.

type ServiceUnset

type ServiceUnset struct {
	ServiceName string
	Options     []string
}

ServiceUnset holds the parameters for a ServiceUnset command. Options contains the option attribute names to unset.

type ServiceUpdate

type ServiceUpdate struct {
	ServiceName     string
	CharmUrl        string
	ForceCharmUrl   bool
	MinUnits        *int
	SettingsStrings map[string]string
	SettingsYAML    string // Takes precedence over SettingsStrings if both are present.
	Constraints     *constraints.Value
}

ServiceUpdate holds the parameters for making the ServiceUpdate call.

type SetAnnotations

type SetAnnotations struct {
	Tag   string
	Pairs map[string]string
}

SetAnnotations stores parameters for making the SetAnnotations call.

type SetConstraints

type SetConstraints struct {
	ServiceName string //optional, if empty, environment constraints are set.
	Constraints constraints.Value
}

SetConstraints stores parameters for making the SetConstraints call.

type SetEntityAddress

type SetEntityAddress struct {
	Tag     string
	Address string
}

SetEntityAddress holds an entity tag and an address.

type SetEntityAddresses

type SetEntityAddresses struct {
	Entities []SetEntityAddress
}

SetEntityAddresses holds the parameters for making a Set*Address call, where the address can be a public or a private one.

type SetEntityStatus

type SetEntityStatus struct {
	Tag    string
	Status Status
	Info   string
	Data   StatusData
}

SetEntityStatus holds an entity tag, status and extra info.

type SetEnvironAgentVersion

type SetEnvironAgentVersion struct {
	Version version.Number
}

SetEnvironAgentVersion contains the arguments for SetEnvironAgentVersion client API call.

type SetMachinesAddresses

type SetMachinesAddresses struct {
	MachineAddresses []MachineAddresses
}

SetMachinesAddresses holds the parameters for making a SetMachineAddresses call.

type SetProvisioned

type SetProvisioned struct {
	Machines []MachineSetProvisioned
}

SetProvisioned holds the parameters for making a SetProvisioned call for a machine.

type SetRsyslogCertParams

type SetRsyslogCertParams struct {
	CACert []byte
}

SetRsyslogCertParams holds parameters for the SetRsyslogCert call.

type SetStatus

type SetStatus struct {
	Entities []SetEntityStatus
}

SetStatus holds the parameters for making a SetStatus call.

type Status

type Status string

Status represents the status of an entity. It could be a unit, machine or its agent.

const (
	// The entity is not yet participating in the environment.
	StatusPending Status = "pending"

	// The unit has performed initial setup and is adapting itself to
	// the environment. Not applicable to machines.
	StatusInstalled Status = "installed"

	// The entity is actively participating in the environment.
	StatusStarted Status = "started"

	// The entity's agent will perform no further action, other than
	// to set the unit to Dead at a suitable moment.
	StatusStopped Status = "stopped"

	// The entity requires human intervention in order to operate
	// correctly.
	StatusError Status = "error"

	// The entity ought to be signalling activity, but it cannot be
	// detected.
	StatusDown Status = "down"
)

func (Status) Valid

func (status Status) Valid() bool

Valid returns true if status has a known value.

type StatusData

type StatusData map[string]interface{}

StatusData contains additional information for a status.

type StatusParams

type StatusParams struct {
	Patterns []string
}

StatusParams holds parameters for the Status call.

type StatusResult

type StatusResult struct {
	Error  *Error
	Status Status
	Info   string
}

StatusResult holds an entity status, extra information, or an error.

type StatusResults

type StatusResults struct {
	Results []StatusResult
}

StatusResults holds multiple status results.

type StringBoolResult

type StringBoolResult struct {
	Error  *Error
	Result string
	Ok     bool
}

StringBoolResult holds the result of an API call that returns a string and a boolean.

type StringBoolResults

type StringBoolResults struct {
	Results []StringBoolResult
}

StringBoolResults holds multiple results with a string and a bool each.

type StringResult

type StringResult struct {
	Error  *Error
	Result string
}

StringResult holds a string or an error.

type StringResults

type StringResults struct {
	Results []StringResult
}

StringResults holds the bulk operation result of an API call that returns a string or an error.

type StringsResult

type StringsResult struct {
	Error  *Error
	Result []string
}

StringsResult holds the result of an API call that returns a slice of strings or an error.

type StringsResults

type StringsResults struct {
	Results []StringsResult
}

StringsResults holds the bulk operation result of an API call that returns a slice of strings or an error.

type StringsWatchResult

type StringsWatchResult struct {
	StringsWatcherId string
	Changes          []string
	Error            *Error
}

StringsWatchResult holds a StringsWatcher id, changes and an error (if any).

type StringsWatchResults

type StringsWatchResults struct {
	Results []StringsWatchResult
}

StringsWatchResults holds the results for any API call which ends up returning a list of StringsWatchers.

type ToolsResult

type ToolsResult struct {
	Tools                          *tools.Tools
	DisableSSLHostnameVerification bool
	Error                          *Error
}

ToolsResult holds the tools and possibly error for a given Tools() API call.

type ToolsResults

type ToolsResults struct {
	Results []ToolsResult
}

ToolsResults is a list of tools for various requested agents.

type UnitInfo

type UnitInfo struct {
	Name           string `bson:"_id"`
	Service        string
	Series         string
	CharmURL       string
	PublicAddress  string
	PrivateAddress string
	MachineId      string
	Ports          []instance.Port
	Status         Status
	StatusInfo     string
	StatusData     StatusData
}

func (*UnitInfo) EntityId

func (i *UnitInfo) EntityId() EntityId

type UnitSettings

type UnitSettings struct {
	Version int64
}

UnitSettings holds information about a service unit's settings within a relation.

type Version

type Version struct {
	Version version.Binary
}

Version holds a specific binary version.

type VersionResult

type VersionResult struct {
	Version *version.Number
	Error   *Error
}

VersionResult holds the version and possibly error for a given DesiredVersion() API call.

type VersionResults

type VersionResults struct {
	Results []VersionResult
}

VersionResults is a list of versions for the requested entities.

type WatchContainer

type WatchContainer struct {
	MachineTag    string
	ContainerType string
}

WatchContainer identifies a single container type within a machine.

type WatchContainers

type WatchContainers struct {
	Params []WatchContainer
}

WatchContainers holds the arguments for making a WatchContainers API call.

Jump to

Keyboard shortcuts

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