Documentation ¶
Index ¶
- Constants
- func ClientError(err error) error
- func ErrCode(err error) string
- func IsCodeCannotEnterScope(err error) bool
- func IsCodeCannotEnterScopeYet(err error) bool
- func IsCodeExcessiveContention(err error) bool
- func IsCodeHasAssignedUnits(err error) bool
- func IsCodeNoAddressSet(err error) bool
- func IsCodeNotAssigned(err error) bool
- func IsCodeNotFound(err error) bool
- func IsCodeNotFoundOrCodeUnauthorized(err error) bool
- func IsCodeNotImplemented(err error) bool
- func IsCodeNotProvisioned(err error) bool
- func IsCodeStopped(err error) bool
- func IsCodeUnauthorized(err error) bool
- func IsCodeUnitHasSubordinates(err error) bool
- type AddMachineParams
- type AddMachines
- type AddMachinesResult
- type AddMachinesResults
- type AddRelation
- type AddRelationResults
- type AddServiceUnits
- type AddServiceUnitsResults
- type AgentGetEntitiesResult
- type AgentGetEntitiesResults
- type AllWatcherId
- type AllWatcherNextResults
- type AnnotationInfo
- type BoolResult
- type BoolResults
- type BytesResult
- type CharmArchiveURLResult
- type CharmArchiveURLResults
- type CharmInfo
- type CharmURL
- type CharmURLs
- type CharmsResponse
- type ConfigSettings
- type ConfigSettingsResult
- type ConfigSettingsResults
- type ConstraintsResult
- type ConstraintsResults
- type ContainerConfig
- type Creds
- type Delta
- type DeployerConnectionValues
- type DestroyMachines
- type DestroyRelation
- type DestroyServiceUnits
- type Endpoint
- type Entities
- type EntitiesCharmURL
- type EntitiesPorts
- type EntitiesVersion
- type Entity
- type EntityCharmURL
- type EntityId
- type EntityInfo
- type EntityPort
- type EntityVersion
- type EnvironConfig
- type EnvironConfigResult
- type EnvironmentGetResults
- type EnvironmentResult
- type EnvironmentSet
- type Error
- type ErrorResult
- type ErrorResults
- type FindToolsParams
- type FindToolsResults
- type GetAnnotations
- type GetAnnotationsResults
- type GetConstraintsResults
- type GetServiceConstraints
- type Life
- type LifeResult
- type LifeResults
- type ListSSHKeys
- type MachineAddresses
- type MachineContainers
- type MachineContainersParams
- type MachineInfo
- type MachineJob
- type MachineSetProvisioned
- type ModifyUserSSHKeys
- type NotifyWatchResult
- type NotifyWatchResults
- type PasswordChange
- type PasswordChanges
- type PortsResult
- type PortsResults
- type ProvisioningScriptParams
- type ProvisioningScriptResult
- type PublicAddress
- type PublicAddressResults
- type RelationIds
- type RelationInfo
- type RelationResult
- type RelationResults
- type RelationSettings
- type RelationSettingsResult
- type RelationSettingsResults
- type RelationUnit
- type RelationUnitPair
- type RelationUnitPairs
- type RelationUnitSettings
- type RelationUnits
- type RelationUnitsChange
- type RelationUnitsSettings
- type RelationUnitsWatchResult
- type RelationUnitsWatchResults
- type Resolved
- type ResolvedMode
- type ResolvedModeResult
- type ResolvedModeResults
- type ResolvedResults
- type RunParams
- type RunResult
- type RunResults
- type ServiceCharmRelations
- type ServiceCharmRelationsResults
- type ServiceDeploy
- type ServiceDestroy
- type ServiceExpose
- type ServiceGet
- type ServiceGetResults
- type ServiceInfo
- type ServiceSet
- type ServiceSetCharm
- type ServiceSetYAML
- type ServiceUnexpose
- type ServiceUnset
- type ServiceUpdate
- type SetAnnotations
- type SetConstraints
- type SetEntityAddress
- type SetEntityAddresses
- type SetEntityStatus
- type SetEnvironAgentVersion
- type SetMachinesAddresses
- type SetProvisioned
- type SetRsyslogCertParams
- type SetStatus
- type Status
- type StatusData
- type StatusParams
- type StatusResult
- type StatusResults
- type StringBoolResult
- type StringBoolResults
- type StringResult
- type StringResults
- type StringsResult
- type StringsResults
- type StringsWatchResult
- type StringsWatchResults
- type ToolsResult
- type ToolsResults
- type UnitInfo
- type UnitSettings
- type Version
- type VersionResult
- type VersionResults
- type WatchContainer
- type WatchContainers
Constants ¶
const ( CodeNotFound = "not found" 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 ¶
clientError maps errors returned from an RPC call into local errors with appropriate values.
func ErrCode ¶
ErrCode returns the error code associated with the given error, or the empty string if there is none.
func IsCodeCannotEnterScope ¶
func IsCodeHasAssignedUnits ¶
func IsCodeNoAddressSet ¶
func IsCodeNotAssigned ¶
func IsCodeNotFound ¶
func IsCodeNotFoundOrCodeUnauthorized ¶
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 IsCodeNotProvisioned ¶
func IsCodeStopped ¶
func IsCodeUnauthorized ¶
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 ¶
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 ¶
AddRelationResults holds the results of a AddRelation call. The Endpoints field maps service names to the involved endpoints.
type AddServiceUnits ¶
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 ¶
func (*AnnotationInfo) EntityId ¶
func (i *AnnotationInfo) EntityId() EntityId
type BoolResult ¶
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 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 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 ¶
MarshalJSON implements json.Marshaler.
func (*Delta) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type DeployerConnectionValues ¶
DeployerConnectionValues containers the result of deployer.ConnectionInfo API call.
type DestroyMachines ¶
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 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 EntityCharmURL ¶
EntityCharmURL holds an entity's tag and a charm URL.
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 ¶
EntityPort holds an entity's tag, a protocol and a port.
type EntityVersion ¶
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 ¶
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 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 ¶
FindToolsParams defines parameters for the FindTools method.
type FindToolsResults ¶
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 ¶
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").
type LifeResult ¶
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 ¶
ListSSHKeys stores parameters used for a KeyManager.ListKeys call.
type MachineAddresses ¶
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 ¶
ModifySSHKeys stores parameters used for a KeyManager.Add|Delete|Import call for a user.
type NotifyWatchResult ¶
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 ¶
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 ¶
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 ¶
func (*RelationInfo) EntityId ¶
func (i *RelationInfo) EntityId() EntityId
type RelationResult ¶
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 ¶
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 ¶
RelationUnit holds a relation and a unit tag.
type RelationUnitPair ¶
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 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 ¶
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 ¶
ServiceSet holds the parameters for a ServiceSet command. Options contains the configuration data.
type ServiceSetCharm ¶
ServiceSetCharm sets the charm for a given service.
type ServiceSetYAML ¶
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 ¶
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 ¶
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 ¶
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 ¶
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" )
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 ¶
StatusResult holds an entity status, extra information, or an error.
type StatusResults ¶
type StatusResults struct {
Results []StatusResult
}
StatusResults holds multiple status results.
type StringBoolResult ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 UnitSettings ¶
type UnitSettings struct {
Version int64
}
UnitSettings holds information about a service unit's settings within a relation.
type VersionResult ¶
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 ¶
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.