Documentation ¶
Index ¶
- Constants
- func ClientError(err error) error
- func ErrCode(err error) string
- func IsCodeActionNotAvailable(err error) bool
- func IsCodeAlreadyExists(err error) bool
- func IsCodeCannotEnterScope(err error) bool
- func IsCodeCannotEnterScopeYet(err error) bool
- func IsCodeDead(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 IsCodeOperationBlocked(err error) bool
- func IsCodeStopped(err error) bool
- func IsCodeTryAgain(err error) bool
- func IsCodeUnauthorized(err error) bool
- func IsCodeUnitHasSubordinates(err error) bool
- func IsCodeUpgradeInProgress(err error) bool
- type APIHostPortsResult
- type Action
- type ActionExecutionResult
- type ActionExecutionResults
- type ActionResult
- type ActionResults
- type Actions
- type ActionsByReceiver
- type ActionsByReceivers
- type ActionsQueryResult
- type ActionsQueryResults
- type AddMachineParams
- type AddMachines
- type AddMachinesResult
- type AddMachinesResults
- type AddRelation
- type AddRelationResults
- type AddServiceUnits
- type AddServiceUnitsResults
- type AddUser
- type AddUserResult
- type AddUserResults
- type AddUsers
- type AgentGetEntitiesResult
- type AgentGetEntitiesResults
- type AgentVersionResult
- type AllWatcherId
- type AllWatcherNextResults
- type AnnotationsGetResult
- type AnnotationsGetResults
- type AnnotationsSet
- type AuthUserInfo
- type BackupsCreateArgs
- type BackupsDownloadArgs
- type BackupsInfoArgs
- type BackupsListArgs
- type BackupsListResult
- type BackupsMetadataResult
- type BackupsRemoveArgs
- type BackupsUploadArgs
- type BackupsUploadResult
- type BlockDeviceFilesystem
- type BlockDeviceResult
- type BlockDeviceResults
- type BlockDevicesResult
- type BlockDevicesResults
- type BoolResult
- type BoolResults
- type BytesResult
- type CharmInfo
- type CharmURL
- type CharmURLs
- type CharmsList
- type CharmsListResult
- type CharmsResponse
- type ClaimLeadershipBulkParams
- type ClaimLeadershipBulkResults
- type ClaimLeadershipParams
- type ClaimLeadershipResults
- type ConfigSettings
- type ConfigSettingsResult
- type ConfigSettingsResults
- type ConstraintsResult
- type ConstraintsResults
- type ContainerConfig
- type ContainerManagerConfig
- type ContainerManagerConfigParams
- type Creds
- type DeployerConnectionValues
- type DestroyMachines
- type DestroyRelation
- type DestroyServiceUnits
- type DistributionGroupResult
- type DistributionGroupResults
- type Entities
- type EntitiesCharmURL
- type EntitiesPortRanges
- type EntitiesPorts
- type EntitiesVersion
- type Entity
- type EntityAnnotations
- type EntityCharmURL
- type EntityPassword
- type EntityPasswords
- type EntityPort
- type EntityPortRange
- type EntityStatus
- type EntityVersion
- type EnvironAction
- type EnvironConfig
- type EnvironConfigResult
- type Environment
- type EnvironmentConfigResults
- type EnvironmentCreateArgs
- type EnvironmentList
- type EnvironmentResult
- type EnvironmentSet
- type EnvironmentSkeletonConfigArgs
- type EnvironmentUnset
- type Error
- type ErrorResult
- type ErrorResults
- type FacadeVersions
- type FindTags
- type FindTagsResults
- type FindToolsParams
- type FindToolsResult
- type GetAnnotations
- type GetAnnotationsResults
- type GetConstraintsResults
- type GetLeadershipSettingsBulkResults
- type GetLeadershipSettingsResult
- type GetServiceConstraints
- type ImageFilterParams
- type ImageMetadata
- type ImageSpec
- type InstanceInfo
- type InstancesInfo
- type IsMasterResult
- type Life
- type LifeResult
- type LifeResults
- type ListImageResult
- type ListSSHKeys
- type LoginRequest
- type LoginRequestCompat
- type LoginResult
- type LoginResultV1
- type MachineAddresses
- type MachineBlockDevices
- type MachineContainers
- type MachineContainersParams
- type MachineNetworkInfoResult
- type MachineNetworkInfoResults
- type MachinePortRange
- type MachinePorts
- type MachinePortsParams
- type MachinePortsResult
- type MachinePortsResults
- type MachineSetProvisioned
- type MergeLeadershipSettingsBulkParams
- type MergeLeadershipSettingsParam
- type MeterStatusResult
- type MeterStatusResults
- type Metric
- type MetricsParam
- type MetricsParams
- type ModifyEnvironUser
- type ModifyEnvironUsers
- type ModifyUserSSHKeys
- type Network
- type NetworkInfo
- type NetworkInterface
- type NotifyWatchResult
- type NotifyWatchResults
- type PortsResult
- type PortsResults
- type PrivateAddress
- type PrivateAddressResults
- type ProvisioningInfo
- type ProvisioningInfoResult
- type ProvisioningInfoResults
- type ProvisioningScriptParams
- type ProvisioningScriptResult
- type PublicAddress
- type PublicAddressResults
- type ReauthRequest
- type RebootAction
- type RebootActionResult
- type RebootActionResults
- type RelationIds
- type RelationResult
- type RelationResults
- type RelationUnit
- type RelationUnitPair
- type RelationUnitPairs
- type RelationUnitSettings
- type RelationUnits
- type RelationUnitsSettings
- type RelationUnitsWatchResult
- type RelationUnitsWatchResults
- type ReleaseLeadershipBulkParams
- type ReleaseLeadershipBulkResults
- type ReleaseLeadershipParams
- type RequestedNetworkResult
- type RequestedNetworksResults
- type ResolveCharmResult
- type ResolveCharmResults
- type ResolveCharms
- type Resolved
- type ResolvedMode
- type ResolvedModeResult
- type ResolvedModeResults
- type ResolvedResults
- type RestoreArgs
- type RsyslogConfigResult
- type RsyslogConfigResults
- type RunParams
- type RunResult
- type RunResults
- type ServiceCharmActionsResult
- type ServiceCharmRelations
- type ServiceCharmRelationsResults
- type ServiceDeploy
- type ServiceDestroy
- type ServiceExpose
- type ServiceGet
- type ServiceGetResults
- type ServiceMetricCredential
- type ServiceMetricCredentials
- type ServiceSet
- type ServiceSetCharm
- type ServiceSetYAML
- type ServiceUnexpose
- type ServiceUnset
- type ServiceUpdate
- type ServicesCharmActionsResults
- type SetAnnotations
- type SetBlockDeviceFilesystem
- type SetConstraints
- type SetEnvironAgentVersion
- type SetMachineBlockDevices
- type SetMachinesAddresses
- type SetProvisioned
- type SetRsyslogCertParams
- type SetStatus
- type Settings
- type SettingsResult
- type SettingsResults
- type StateServersChangeResult
- type StateServersChangeResults
- type StateServersChanges
- type StateServersSpec
- type StateServersSpecs
- type StateServingInfo
- type Status
- type StatusParams
- type StatusResult
- type StatusResults
- type StorageInstance
- type StorageInstanceResult
- type StorageInstanceResults
- type StorageShowResult
- type StorageShowResults
- type StringBoolResult
- type StringBoolResults
- type StringResult
- type StringResults
- type StringsResult
- type StringsResults
- type StringsWatchResult
- type StringsWatchResults
- type ToolsResult
- type ToolsResults
- type UnitStorageInstances
- type UnitStorageInstancesResults
- type UpdateBehavior
- type UserInfo
- type UserInfoRequest
- type UserInfoResult
- type UserInfoResults
- type Version
- type VersionResult
- type VersionResults
- type WatchContainer
- type WatchContainers
Constants ¶
const ( // ActionCancelled is the status for an Action that has been // cancelled prior to execution. ActionCancelled string = "cancelled" // ActionCompleted is the status of an Action that has completed // successfully. ActionCompleted string = "completed" // ActionFailed is the status of an Action that has completed with // an error. ActionFailed string = "failed" // ActionPending is the status of an Action that has been queued up but // not executed yet. ActionPending string = "pending" // ActionRunning is the status of an Action that has been started but // not completed yet. ActionRunning string = "running" )
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" CodeDead = "dead" CodeHasAssignedUnits = "machine has assigned units" CodeNotProvisioned = "not provisioned" CodeNoAddressSet = "no address set" CodeTryAgain = "try again" CodeNotImplemented = rpc.CodeNotImplemented CodeAlreadyExists = "already exists" CodeUpgradeInProgress = "upgrade in progress" CodeActionNotAvailable = "action no longer available" CodeOperationBlocked = "operation is blocked" )
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 IsCodeAlreadyExists ¶
func IsCodeCannotEnterScope ¶
func IsCodeDead ¶
func IsCodeHasAssignedUnits ¶
func IsCodeNoAddressSet ¶
func IsCodeNotAssigned ¶
func IsCodeNotFound ¶
func IsCodeNotFoundOrCodeUnauthorized ¶
IsCodeNotFoundOrCodeUnauthorized is used in API clients which, pre-API, used errors.IsNotFound; 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 IsCodeOperationBlocked ¶
func IsCodeStopped ¶
func IsCodeTryAgain ¶
func IsCodeUnauthorized ¶
func IsCodeUpgradeInProgress ¶
Types ¶
type APIHostPortsResult ¶
type APIHostPortsResult struct { // TODO(dimitern): Add explicit JSON serialization tags and use // [][]string instead in order to break the dependency on the // network package, as this potentially introduces hard to catch // and debug wire-format changes in the protocol when the type // changes! Servers [][]network.HostPort }
APIHostPortsResult holds the result of an APIHostPorts call. Each element in the top level slice holds the addresses for one API server.
type Action ¶
type Action struct { Tag string `json:"tag"` Receiver string `json:"receiver"` Name string `json:"name"` Parameters map[string]interface{} `json:"parameters,omitempty"` }
Action describes an Action that will be or has been queued up.
type ActionExecutionResult ¶
type ActionExecutionResult struct { ActionTag string `json:"actiontag"` Status string `json:"status"` Results map[string]interface{} `json:"results,omitempty"` Message string `json:"message,omitempty"` }
ActionExecutionResult holds the action tag and output used when recording the result of an action.
type ActionExecutionResults ¶
type ActionExecutionResults struct {
Results []ActionExecutionResult `json:"results,omitempty"`
}
ActionExecutionResults holds a slice of ActionExecutionResult for a bulk action API call
type ActionResult ¶
type ActionResult struct { Action *Action `json:"action,omitempty"` Enqueued time.Time `json:"enqueued,omitempty"` Started time.Time `json:"started,omitempty"` Completed time.Time `json:"completed,omitempty"` Status string `json:"status,omitempty"` Message string `json:"message,omitempty"` Output map[string]interface{} `json:"output,omitempty"` Error *Error `json:"error,omitempty"` }
ActionResult describes an Action that will be or has been completed.
type ActionResults ¶
type ActionResults struct {
Results []ActionResult `json:"results,omitempty"`
}
ActionResults is a slice of ActionResult for bulk requests.
type Actions ¶
type Actions struct {
Actions []Action `json:"actions,omitempty"`
}
Actions is a slice of Action for bulk requests.
type ActionsByReceiver ¶
type ActionsByReceiver struct { Receiver string `json:"receiver,omitempty"` Actions []ActionResult `json:"actions,omitempty"` Error *Error `json:"error,omitempty"` }
ActionsByReceiver is a bulk API call wrapper containing Actions, either as input paramters or as results.
type ActionsByReceivers ¶
type ActionsByReceivers struct {
Actions []ActionsByReceiver `json:"actions,omitempty"`
}
ActionsByReceivers wrap a slice of Actions for API calls.
type ActionsQueryResult ¶
type ActionsQueryResult struct { Receiver string `json:"receiver,omitempty"` Action ActionResult `json:"action,omitempty"` Error *Error `json:"error,omitempty"` }
ActionsQueryResult holds the name and parameters of an query result.
type ActionsQueryResults ¶
type ActionsQueryResults struct {
Results []ActionsQueryResult `json:"results,omitempty"`
}
ActionsQueryResults holds a slice of responses from the Actions query.
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 []multiwatcher.MachineJob // Disks describes constraints for disks that must be attached to // the machine when it is provisioned. // // NOTE: this is ignored unless the "storage" feature flag is enabled. Disks []storage.Constraints // If Placement is non-nil, it contains a placement directive // that will be used to decide how to instantiate the machine. Placement *instance.Placement // 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 // TODO(dimitern): Add explicit JSON serialization tags and use // []string instead in order to break the dependency on the // network package, as this potentially introduces hard to catch // and debug wire-format changes in the protocol when the type // changes! Addrs []network.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 AddMachinesWithPlacement call.
type AddMachinesResult ¶
AddMachinesResults holds the name of a machine added by the 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 ¶
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 AddUser ¶
type AddUser struct { Username string `json:"username"` DisplayName string `json:"display-name"` Password string `json:"password"` }
AddUser stores the parameters to add one user.
type AddUserResult ¶
type AddUserResult struct { Tag string `json:"tag,omitempty"` Error *Error `json:"error,omitempty"` }
AddUserResult returns the tag of the newly created user, or an error.
type AddUserResults ¶
type AddUserResults struct {
Results []AddUserResult `json:"results"`
}
AddUserResults holds the results of the bulk AddUser API call.
type AddUsers ¶
type AddUsers struct {
Users []AddUser `json:"users"`
}
AddUsers holds the parameters for adding new users.
type AgentGetEntitiesResult ¶
type AgentGetEntitiesResult struct { Life Life Jobs []multiwatcher.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 AgentVersionResult ¶
AgentVersionResult is used to return the current version number of the agent running the API server.
type AllWatcherId ¶
type AllWatcherId struct {
AllWatcherId string
}
AllWatcherId holds the id of an AllWatcher.
type AllWatcherNextResults ¶
type AllWatcherNextResults struct {
Deltas []multiwatcher.Delta
}
AllWatcherNextResults holds deltas returned from calling AllWatcher.Next().
type AnnotationsGetResult ¶
type AnnotationsGetResult struct { EntityTag string Annotations map[string]string Error ErrorResult }
AnnotationsGetResult holds entity annotations or retrieval error.
type AnnotationsGetResults ¶
type AnnotationsGetResults struct {
Results []AnnotationsGetResult
}
AnnotationsGetResults holds annotations associated with entities.
type AnnotationsSet ¶
type AnnotationsSet struct {
Annotations []EntityAnnotations
}
AnnotationsSet stores parameters for making Set call on Annotations client.
type AuthUserInfo ¶
type AuthUserInfo struct { DisplayName string `json:"display-name"` Identity string `json:"identity"` LastConnection *time.Time `json:"last-connection,omitempty"` // Credentials contains an optional opaque credential value to be held by // the client, if any. Credentials *string `json:"credentials,omitempty"` }
AuthUserInfo describes a logged-in local user or remote identity.
type BackupsCreateArgs ¶
type BackupsCreateArgs struct {
Notes string
}
BackupsCreateArgs holds the args for the API Create method.
type BackupsDownloadArgs ¶
type BackupsDownloadArgs struct {
ID string
}
BackupsDownloadArgs holds the args for the API Download method.
type BackupsInfoArgs ¶
type BackupsInfoArgs struct {
ID string
}
BackupsInfoArgs holds the args for the API Info method.
type BackupsListArgs ¶
type BackupsListArgs struct { }
BackupsListArgs holds the args for the API List method.
type BackupsListResult ¶
type BackupsListResult struct {
List []BackupsMetadataResult
}
BackupsListResult holds the list of all stored backups.
type BackupsMetadataResult ¶
type BackupsMetadataResult struct { ID string Checksum string ChecksumFormat string Size int64 Stored time.Time // May be zero... Started time.Time Finished time.Time // May be zero... Notes string Environment string Machine string Hostname string Version version.Number }
BackupsMetadataResult holds the metadata for a backup as returned by an API backups method (such as Create).
type BackupsRemoveArgs ¶
type BackupsRemoveArgs struct {
ID string
}
BackupsRemoveArgs holds the args for the API Remove method.
type BackupsUploadArgs ¶
type BackupsUploadArgs struct { Data []byte Metadata BackupsMetadataResult }
BackupsUploadArgs holds the args for the API Upload method.
type BackupsUploadResult ¶
type BackupsUploadResult struct {
ID string
}
BackupsListResult holds the list of all stored backups.
type BlockDeviceFilesystem ¶
type BlockDeviceFilesystem struct { DiskTag string `json:"disktag"` StorageTag string `json:"storagetag"` FilesystemType string `json:"fstype"` }
BlockDeviceFilesystem holds the parameters for recording information about the specified block device's filesystem.
type BlockDeviceResult ¶
type BlockDeviceResult struct { Result storage.BlockDevice `json:"result"` Error *Error `json:"error,omitempty"` }
BlockDeviceResult holds the result of an API call to retrieve details of a block device.
type BlockDeviceResults ¶
type BlockDeviceResults struct {
Results []BlockDeviceResult `json:"results,omitempty"`
}
BlockDeviceResults holds the result of an API call to retrieve details of multiple block devices.
type BlockDevicesResult ¶
type BlockDevicesResult struct { Result []storage.BlockDevice `json:"result"` Error *Error `json:"error,omitempty"` }
BlockDevicesResult holds the result of an API call to retrieve details of all block devices relating to some entity.
type BlockDevicesResults ¶
type BlockDevicesResults struct {
Results []BlockDevicesResult `json:"results,omitempty"`
}
BlockDevicseResults holds the result of an API call to retrieve details of all block devices relating to some entities.
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 CharmInfo ¶
type CharmInfo struct {
CharmURL string
}
CharmInfo stores parameters for a charms.CharmInfo call.
type CharmURLs ¶
type CharmURLs struct {
URLs []CharmURL
}
CharmURLs identifies multiple charm URLs.
type CharmsList ¶
type CharmsList struct {
Names []string
}
CharmsList stores parameters for a charms.List call
type CharmsListResult ¶
type CharmsListResult struct {
CharmURLs []string
}
CharmsListResult stores result from a charms.List call
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 ClaimLeadershipBulkParams ¶
type ClaimLeadershipBulkParams struct { // Params are the parameters for making a bulk leadership claim. Params []ClaimLeadershipParams }
ClaimLeadershipBulkParams is a collection of parameters for making a bulk leadership claim.
type ClaimLeadershipBulkResults ¶
type ClaimLeadershipBulkResults struct { // Results is the collection of results from the claim. Results []ClaimLeadershipResults }
ClaimLeadershipBulkResults is the collection of results from a bulk leadership claim.
type ClaimLeadershipParams ¶
type ClaimLeadershipParams struct { // ServiceTag is the service for which you want to make a // leadership claim. ServiceTag string // UnitTag is the unit which is making the leadership claim. UnitTag string }
ClaimLeadershipParams are the parameters needed for making a leadership claim.
type ClaimLeadershipResults ¶
type ClaimLeadershipResults struct { // ServiceTag is the service for which you want to make a // leadership claim. ServiceTag string // ClaimDurationInSec is the number of seconds a claim will be // held. ClaimDurationInSec float64 // Error is filled in if there was an error fulfilling the claim. Error *Error }
ClaimLeadershipResults are the results from making a leadership claim.
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 proxy.Settings AptProxy proxy.Settings AptMirror string PreferIPv6 bool *UpdateBehavior }
ContainerConfig contains information from the environment config that is needed for container cloud-init.
type ContainerManagerConfig ¶
ContainerManagerConfig contains information from the environment config that is needed for configuring the container manager.
type ContainerManagerConfigParams ¶
type ContainerManagerConfigParams struct {
Type instance.ContainerType
}
ContainerManagerConfigParams contains the parameters for the ContainerManagerConfig provisioner API call.
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 DistributionGroupResult ¶
DistributionGroupResult contains the result of the DistributionGroup provisioner API call.
type DistributionGroupResults ¶
type DistributionGroupResults struct {
Results []DistributionGroupResult
}
DistributionGroupResults is the bulk form of DistributionGroupResult.
type EntitiesCharmURL ¶
type EntitiesCharmURL struct {
Entities []EntityCharmURL
}
EntitiesCharmURL holds the parameters for making a SetCharmURL API call.
type EntitiesPortRanges ¶
type EntitiesPortRanges struct {
Entities []EntityPortRange
}
EntitiesPortRanges holds the parameters for making an OpenPorts or ClosePorts on some entities.
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 EntityAnnotations ¶
EntityAnnotations stores annotations for an entity.
type EntityCharmURL ¶
EntityCharmURL holds an entity's tag and a charm URL.
type EntityPassword ¶
EntityPassword specifies a password change for the entity with the given tag.
type EntityPasswords ¶
type EntityPasswords struct {
Changes []EntityPassword
}
EntityPasswords holds the parameters for making a SetPasswords call.
type EntityPort ¶
EntityPort holds an entity's tag, a protocol and a port.
type EntityPortRange ¶
EntityPortRange holds an entity's tag, a protocol and a port range.
type EntityStatus ¶
EntityStatus holds an entity tag, status and extra info.
type EntityVersion ¶
EntityVersion specifies the tools version to be set for an entity with the given tag. version.Binary directly.
type EnvironAction ¶
type EnvironAction string
EnvironAction is an action that can be preformed on an environment.
const ( AddEnvUser EnvironAction = "add" RemoveEnvUser EnvironAction = "remove" )
Actions that can be preformed on an environment.
type EnvironConfig ¶
type EnvironConfig map[string]interface{}
EnvironConfig holds an environment configuration.
type EnvironConfigResult ¶
type EnvironConfigResult struct {
Config EnvironConfig
}
EnvironConfigResult holds environment configuration or an error.
type Environment ¶
Environment holds the result of an API call returning a name and UUID for an environment.
type EnvironmentConfigResults ¶
type EnvironmentConfigResults struct {
Config map[string]interface{}
}
EnvironmentConfigResults contains the result of client API calls to get environment config values.
type EnvironmentCreateArgs ¶
type EnvironmentCreateArgs struct { // OwnerTag represents the user that will own the new environment. // The OwnerTag must be a valid user tag. If the user tag represents // a local user, that user must exist. OwnerTag string // Account holds the provider specific account details necessary to // interact with the provider to create, list and destroy machines. Account map[string]interface{} // Config defines the environment config, which includes the name of the // environment. An environment UUID is allocated by the API server during // the creation of the environment. Config map[string]interface{} }
EnvironmentCreateArgs holds the arguments that are necessary to create and environment.
type EnvironmentList ¶
type EnvironmentList struct {
Environments []Environment
}
EnvironmentList holds information about a list of environments.
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 EnvironmentSkeletonConfigArgs ¶
EnvironmentSkeletonConfigArgs wraps the args for environmentmanager.SkeletonConfig.
type EnvironmentUnset ¶
type EnvironmentUnset struct {
Keys []string
}
EnvironmentUnset contains the arguments for EnvironmentUnset 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) Combine ¶
func (result ErrorResults) Combine() error
Combine returns one error from the result which is an accumulation of the errors. If there are no errors in the result, the return value is nil. Otherwise the error values are combined with new-line characters.
func (ErrorResults) OneError ¶
func (result ErrorResults) OneError() error
OneError returns the error from the result of a bulk operation on a single value.
type FacadeVersions ¶
FacadeVersions describes the available Facades and what versions of each one are available
type FindTags ¶
type FindTags struct {
Prefixes []string `json:"prefixes"`
}
FindTags wraps a slice of strings that are prefixes to use when searching for matching tags.
type FindTagsResults ¶
FindTagResults wraps the mapping between the requested prefix and the matching tags for each requested prefix.
type FindToolsParams ¶
type FindToolsParams struct { // Number will be used to match tools versions exactly if non-zero. Number version.Number // MajorVersion will be used to match the major version if non-zero. MajorVersion int // MinorVersion will be used to match the major version if greater // than or equal to zero, and Number is zero. MinorVersion int // Arch will be used to match tools by architecture if non-empty. Arch string // Series will be used to match tools by series if non-empty. Series string }
FindToolsParams defines parameters for the FindTools method.
type FindToolsResult ¶
FindToolsResult 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 GetLeadershipSettingsBulkResults ¶
type GetLeadershipSettingsBulkResults struct {
Results []GetLeadershipSettingsResult
}
GetLeadershipSettingsBulkResults is the collection of results from a bulk request for leadership settings.
type GetLeadershipSettingsResult ¶
GetLeadershipSettingsResult is the results from requesting leadership settings.
type GetServiceConstraints ¶
type GetServiceConstraints struct {
ServiceName string
}
GetServiceConstraints stores parameters for making the GetServiceConstraints call.
type ImageFilterParams ¶
type ImageFilterParams struct {
Images []ImageSpec `json:"images"`
}
ImageFilterParams holds the parameters used to specify images to delete.
type ImageMetadata ¶
type ImageMetadata struct { Kind string `json:"kind"` Arch string `json:"arch"` Series string `json:"series"` URL string `json:"url"` Created time.Time `json:"created"` }
ImageMetadata represents an image in storage.
type ImageSpec ¶
type ImageSpec struct { Kind string `json:"kind"` Arch string `json:"arch"` Series string `json:"series"` }
ImageSpec defines the parameters to select images list or delete.
type InstanceInfo ¶
type InstanceInfo struct { Tag string InstanceId instance.Id Nonce string Characteristics *instance.HardwareCharacteristics Networks []Network Interfaces []NetworkInterface Volumes []storage.BlockDevice }
InstanceInfo holds a machine tag, provider-specific instance id, a nonce, a list of networks and interfaces to set up.
type InstancesInfo ¶
type InstancesInfo struct {
Machines []InstanceInfo
}
InstancesInfo holds the parameters for making a SetInstanceInfo call for multiple machines.
type IsMasterResult ¶
type IsMasterResult struct { // Master reports whether the connected agent // lives on the same instance as the mongo replica // set master. Master bool }
IsMasterResult holds the result of an IsMaster API call.
type Life ¶
type Life multiwatcher.Life
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 ListImageResult ¶
type ListImageResult struct {
Result []ImageMetadata `json:"result"`
}
ListImageResult holds the results of querying images.
type ListSSHKeys ¶
ListSSHKeys stores parameters used for a KeyManager.ListKeys call.
type LoginRequest ¶
type LoginRequest struct { AuthTag string `json:"auth-tag"` Credentials string `json:"credentials"` Nonce string `json:"nonce"` }
LoginRequest holds credentials for identifying an entity to the Login v1 facade.
type LoginRequestCompat ¶
type LoginRequestCompat struct { LoginRequest Creds }
LoginRequestCompat holds credentials for identifying an entity to the Login v1 or earlier (v0 or even pre-facade).
type LoginResult ¶
type LoginResult struct { // TODO(dimitern): Add explicit JSON serialization tags and use // [][]string instead in order to break the dependency on the // network package, as this potentially introduces hard to catch // and debug wire-format changes in the protocol when the type // changes! Servers [][]network.HostPort EnvironTag string LastConnection *time.Time Facades []FacadeVersions }
LoginResult holds the result of a Login call.
type LoginResultV1 ¶
type LoginResultV1 struct { // TODO(dimitern): Use [][]string instead in order to break the // dependency on the network package, as this potentially // introduces hard to catch and debug wire-format changes in the // protocol when the type changes! Servers [][]network.HostPort `json:"servers"` // EnvironTag is the tag for the environment that is being connected to. EnvironTag string `json:"environ-tag"` // ServerTag is the tag for the environment that holds the API servers. // This is the initial environment created when bootstrapping juju. ServerTag string `json:"server-tag"` // ReauthRequest can be used to relay any further authentication handshaking // required on the part of the client to complete the Login, if any. ReauthRequest *ReauthRequest `json:"reauth-request,omitempty"` // UserInfo describes the authenticated user, if any. UserInfo *AuthUserInfo `json:"user-info,omitempty"` // Facades describes all the available API facade versions to the // authenticated client. Facades []FacadeVersions `json:"facades"` }
LoginRequestV1 holds the result of an Admin v1 Login call.
type MachineAddresses ¶
type MachineAddresses struct { Tag string // TODO(dimitern): Add explicit JSON serialization tags and use // []string instead in order to break the dependency on the // network package, as this potentially introduces hard to catch // and debug wire-format changes in the protocol when the type // changes! Addresses []network.Address }
MachineAddresses holds an machine tag and addresses.
type MachineBlockDevices ¶
type MachineBlockDevices struct { Machine string BlockDevices []storage.BlockDevice }
MachineBlockDevices holds a machine tag and the block devices present on that machine.
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 MachineNetworkInfoResult ¶
type MachineNetworkInfoResult struct { Error *Error Info []NetworkInfo `json:"Info"` }
MachineNetworkInfoResult holds network info for a single machine.
type MachineNetworkInfoResults ¶
type MachineNetworkInfoResults struct {
Results []MachineNetworkInfoResult
}
MachineNetworkInfoResults holds network info for multiple machines.
type MachinePortRange ¶
type MachinePortRange struct { UnitTag string RelationTag string // TODO(dimitern): Add explicit JSON serialization tags and use // string instead in order to break the dependency on the network // package, as this potentially introduces hard to catch and debug // wire-format changes in the protocol when the type changes! PortRange network.PortRange }
MachinePortRange holds a single port range open on a machine for the given unit and relation tags.
type MachinePorts ¶
MachinePorts holds a machine and network tags. It's used when referring to opened ports on the machine for a network.
type MachinePortsParams ¶
type MachinePortsParams struct {
Params []MachinePorts
}
MachinePortsParams holds the arguments for making a FirewallerAPIV1.GetMachinePorts() API call.
type MachinePortsResult ¶
type MachinePortsResult struct { Error *Error Ports []MachinePortRange }
MachinePortsResult holds a single result of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.
type MachinePortsResults ¶
type MachinePortsResults struct {
Results []MachinePortsResult
}
MachinePortsResults holds all the results of the FirewallerAPIV1.GetMachinePorts() and UniterAPI.AllMachinePorts() API calls.
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.
NOTE: This is deprecated since 1.19.0 and not used by the provisioner, it's just retained for backwards-compatibility and should be removed.
type MergeLeadershipSettingsBulkParams ¶
type MergeLeadershipSettingsBulkParams struct { // Params are the parameters for making a bulk leadership settings // merge. Params []MergeLeadershipSettingsParam }
MergeLeadershipSettingsBulkParams is a collection of parameters for making a bulk merge of leadership settings.
type MergeLeadershipSettingsParam ¶
type MergeLeadershipSettingsParam struct { // ServiceTag is the service for which you want to merge // leadership settings. ServiceTag string // Settings are the Leadership settings you wish to merge in. Settings Settings }
MergeLeadershipSettingsParam are the parameters needed for merging in leadership settings.
type MeterStatusResult ¶
MeterStatusResult holds unit meter status or error.
type MeterStatusResults ¶
type MeterStatusResults struct {
Results []MeterStatusResult
}
MeterStatusResults holds meter status results for multiple units.
type MetricsParam ¶
MetricsParam contains the metrics for a single unit.
type MetricsParams ¶
type MetricsParams struct {
Metrics []MetricsParam
}
MetricsParams contains the metrics for multiple units.
type ModifyEnvironUser ¶
type ModifyEnvironUser struct { UserTag string `json:"user-tag"` Action EnvironAction `json:"action"` }
ModifyEnvironUser stores the parameters used for a Client.ShareEnvironment call.
type ModifyEnvironUsers ¶
type ModifyEnvironUsers struct {
Changes []ModifyEnvironUser
}
ModifyEnvironUsers holds the parameters for making Client ShareEnvironment calls.
type ModifyUserSSHKeys ¶
ModifySSHKeys stores parameters used for a KeyManager.Add|Delete|Import call for a user.
type Network ¶
type Network struct { // Tag is the network's tag. Tag string // ProviderId is the provider-specific network id. ProviderId network.Id // CIDR of the network, in "123.45.67.89/12" format. CIDR string // VLANTag needs to be between 1 and 4094 for VLANs and 0 for // normal networks. It's defined by IEEE 802.1Q standard. VLANTag int }
Network describes a single network available on an instance.
type NetworkInfo ¶
type NetworkInfo struct { // DeviceIndex specifies the order in which the network interface // appears on the host. The primary interface has an index of 0. DeviceIndex int // MACAddress is the network interface's hardware MAC address // (e.g. "aa:bb:cc:dd:ee:ff"). MACAddress string // CIDR of the network, in 123.45.67.89/24 format. CIDR string // NetworkName is juju-internal name of the network. // TODO(dimitern) This should be removed or adapted to the model // once spaces are introduced. NetworkName string // ProviderId is a provider-specific network id. ProviderId network.Id // VLANTag needs to be between 1 and 4094 for VLANs and 0 for // normal networks. It's defined by IEEE 802.1Q standard. VLANTag int // InterfaceName is the raw OS-specific network device name (e.g. // "eth1", even for a VLAN eth1.42 virtual interface). InterfaceName string // Disabled is true when the interface needs to be disabled on the // machine, e.g. not to configure it at all or stop it if running. Disabled bool // NoAutoStart is true when the interface should not be configured // to start automatically on boot. By default and for // backwards-compatibility, interfaces are configured to // auto-start. NoAutoStart bool `json:",omitempty"` // ConfigType, if set, defines what type of configuration to use. // See network.InterfaceConfigType for more info. If not set, for // backwards-compatibility, "dhcp" is assumed. ConfigType string `json:",omitempty"` // Address contains an optional static IP address to configure for // this network interface. The subnet mask to set will be inferred // from the CIDR value. Address string `json:",omitempty"` // DNSServers contains an optional list of IP addresses and/or // hostnames to configure as DNS servers for this network // interface. DNSServers []string `json:",omitempty"` // Gateway address, if set, defines the default gateway to // configure for this network interface. For containers this // usually (one of) the host address(es). GatewayAddress string `json:",omitempty"` // ExtraConfig can contain any valid setting and its value allowed // inside an "iface" section of a interfaces(5) config file, e.g. // "up", "down", "mtu", etc. ExtraConfig map[string]string `json:",omitempty"` }
NetworkInfo describes all the necessary information to configure all network interfaces on a machine. This mostly duplicates network.InterfaceInfo type and it's defined here so it can be kept separate and stable as definition to ensure proper wire-format for the API.
type NetworkInterface ¶
type NetworkInterface struct { // MACAddress is the network interface's hardware MAC address // (e.g. "aa:bb:cc:dd:ee:ff"). MACAddress string // InterfaceName is the OS-specific network device name (e.g. // "eth1", even for for a VLAN eth1.42 virtual interface). InterfaceName string // NetworkTag is this interface's network tag. NetworkTag string // IsVirtual is true when the interface is a virtual device, as // opposed to a physical device. IsVirtual bool // Disabled returns whether the interface is disabled. Disabled bool }
NetworkInterface describes a single network interface available on an instance.
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 PortsResult ¶
type PortsResult struct { Error *Error // TODO(dimitern): Add explicit JSON serialization tags and use // []string instead in order to break the dependency on the // network package, as this potentially introduces hard to catch // and debug wire-format changes in the protocol when the type // changes! Ports []network.Port }
PortsResult holds the result of an API call that returns a slice of network.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 network.Port.
type PrivateAddress ¶
type PrivateAddress struct {
Target string
}
PrivateAddress holds parameters for the PrivateAddress call.
type PrivateAddressResults ¶
type PrivateAddressResults struct {
PrivateAddress string
}
PrivateAddressResults holds results of the PrivateAddress call.
type ProvisioningInfo ¶
type ProvisioningInfo struct { Constraints constraints.Value Series string Placement string Networks []string Jobs []multiwatcher.MachineJob Volumes []storage.VolumeParams }
ProvisioningInfo holds machine provisioning info.
type ProvisioningInfoResult ¶
type ProvisioningInfoResult struct { Error *Error Result *ProvisioningInfo }
ProvisioningInfoResult holds machine provisioning info or an error.
type ProvisioningInfoResults ¶
type ProvisioningInfoResults struct {
Results []ProvisioningInfoResult
}
ProvisioningInfoResults holds multiple machine provisioning info results.
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 ReauthRequest ¶
ReauthRequest holds a challenge/response token meaningful to the identity provider.
type RebootAction ¶
type RebootAction string
RebootAction defines the action a machine should take when a hook needs to reboot
const ( // ShouldDoNothing instructs a machine agent that no action // is required on its part ShouldDoNothing RebootAction = "noop" // ShouldReboot instructs a machine to reboot // this happens when a hook running on a machine, requests // a reboot ShouldReboot RebootAction = "reboot" // ShouldShutdown instructs a machine to shut down. This usually // happens when running inside a container, and a hook on the parent // machine requests a reboot ShouldShutdown RebootAction = "shutdown" )
type RebootActionResult ¶
type RebootActionResult struct { Result RebootAction `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
RebootActionResult holds the result of a single call to machine.ShouldRebootOrShutdown.
type RebootActionResults ¶
type RebootActionResults struct {
Results []RebootActionResult `json:"results,omitempty"`
}
RebootActionResults holds a list of RebootActionResult and any error.
type RelationIds ¶
type RelationIds struct {
RelationIds []int
}
RelationIds holds multiple relation ids.
type RelationResult ¶
type RelationResult struct { Error *Error Life Life Id int Key string Endpoint multiwatcher.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 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 ¶
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 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 multiwatcher.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 ReleaseLeadershipBulkParams ¶
type ReleaseLeadershipBulkParams struct {
Params []ReleaseLeadershipParams
}
ReleaseLeadershipBulkParams is a collection of parameters needed to make a bulk release leadership call.
type ReleaseLeadershipBulkResults ¶
type ReleaseLeadershipBulkResults ErrorResults
ReleaseLeadershipBulkResults is a type which contains results from a bulk leadership call.
type ReleaseLeadershipParams ¶
type ReleaseLeadershipParams struct { // ServiceTag is the service for which you want to make a // leadership claim. ServiceTag string // UnitTag is the unit which is making the leadership claim. UnitTag string }
ReleaseLeadershipParams are the parameters needed to release a leadership claim.
type RequestedNetworkResult ¶
RequestedNetworkResult holds requested networks or an error.
type RequestedNetworksResults ¶
type RequestedNetworksResults struct {
Results []RequestedNetworkResult
}
RequestedNetworksResults holds multiple requested networks results.
type ResolveCharmResult ¶
type ResolveCharmResult struct { URL *charm.URL `json:",omitempty"` Error string `json:",omitempty"` }
ResolveCharmResult holds the result of resolving a charm reference to a URL, or any error that occurred.
type ResolveCharmResults ¶
type ResolveCharmResults struct {
URLs []ResolveCharmResult
}
ResolveCharmResults holds results of the ResolveCharms call.
type ResolveCharms ¶
type ResolveCharms struct {
References []charm.Reference
}
ResolveCharms stores charm references for a ResolveCharms 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 ¶
ResolvedResults holds results of the Resolved call.
type RestoreArgs ¶
type RestoreArgs struct { PrivateAddress string NewInstId instance.Id NewInstTag names.Tag NewInstSeries string }
RestoreArgs holds the args to be used to call state/backups.Restore
type RsyslogConfigResult ¶
type RsyslogConfigResult struct { Error *Error CACert string // Port is only used by state servers as the port to listen on. // Clients should use HostPorts for the rsyslog addresses to forward // logs to. Port int // TODO(dimitern): Add explicit JSON serialization tags and use // []string instead in order to break the dependency on the // network package, as this potentially introduces hard to catch // and debug wire-format changes in the protocol when the type // changes! HostPorts []network.HostPort }
RsyslogConfigResult holds the result of a GetRsyslogConfig call.
type RsyslogConfigResults ¶
type RsyslogConfigResults struct {
Results []RsyslogConfigResult
}
RsyslogConfigResults is the bulk form of RyslogConfigResult
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 ServiceCharmActionsResult ¶
type ServiceCharmActionsResult struct { ServiceTag string `json:"servicetag,omitempty"` Actions *charm.Actions `json:"actions,omitempty"` Error *Error `json:"error,omitempty"` }
ServiceCharmActionsResult holds service name and charm.Actions for the service. If an error such as a missing charm or malformed service name occurs, it is encapsulated in this type.
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 Networks []string Storage map[string]storage.Constraints }
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 ServiceMetricCredential ¶
ServiceMetricCredential holds parameters for the SetServiceCredentials call.
type ServiceMetricCredentials ¶
type ServiceMetricCredentials struct {
Creds []ServiceMetricCredential
}
ServiceMetricCredentials holds multiple ServiceMetricCredential parameters.
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 ServicesCharmActionsResults ¶
type ServicesCharmActionsResults struct {
Results []ServiceCharmActionsResult `json:"results,omitempty"`
}
ServicesCharmActionsResults holds a slice of ServiceCharmActionsResult for a bulk result of charm Actions for Services.
type SetAnnotations ¶
SetAnnotations stores parameters for making the SetAnnotations call.
type SetBlockDeviceFilesystem ¶
type SetBlockDeviceFilesystem struct {
Filesystems []BlockDeviceFilesystem `json:"filesystems"`
}
SetBlockDeviceFilesystem holds the parameters for recording information about the filesystems corresponding to the specified block devices.
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 SetEnvironAgentVersion ¶
SetEnvironAgentVersion contains the arguments for SetEnvironAgentVersion client API call.
type SetMachineBlockDevices ¶
type SetMachineBlockDevices struct {
MachineBlockDevices []MachineBlockDevices
}
SetMachineBlockDevices holds the arguments for recording the block devices present on a set of machines.
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.
NOTE: This is deprecated since 1.19.0 and not used by the provisioner, it's just retained for backwards-compatibility and should be removed.
type SetRsyslogCertParams ¶
type SetRsyslogCertParams struct {
CACert []byte
}
SetRsyslogCertParams holds parameters for the SetRsyslogCert call.
type SetStatus ¶
type SetStatus struct {
Entities []EntityStatus
}
SetStatus holds the parameters for making a SetStatus/UpdateStatus call.
type SettingsResult ¶
SettingsResult holds a relation settings map or an error.
type SettingsResults ¶
type SettingsResults struct {
Results []SettingsResult
}
SettingsResults holds the result of an API calls that returns settings for multiple relations.
type StateServersChangeResult ¶
type StateServersChangeResult struct { Result StateServersChanges Error *Error }
StateServersChangeResult contains the results of a single EnsureAvailability API call or an error.
type StateServersChangeResults ¶
type StateServersChangeResults struct {
Results []StateServersChangeResult
}
StateServersChangeResults contains the results of the EnsureAvailability API call.
type StateServersChanges ¶
type StateServersChanges struct { Added []string `json:"added,omitempty"` Maintained []string `json:"maintained,omitempty"` Removed []string `json:"removed,omitempty"` Promoted []string `json:"promoted,omitempty"` Demoted []string `json:"demoted,omitempty"` }
StateServersChange lists the servers that have been added, removed or maintained in the pool as a result of an ensure-availability operation.
type StateServersSpec ¶
type StateServersSpec struct { EnvironTag string NumStateServers int `json:"num-state-servers"` Constraints constraints.Value `json:"constraints,omitempty"` // Series is the series to associate with new state server machines. // If this is empty, then the environment's default series is used. Series string `json:"series,omitempty"` // Placement defines specific machines to become new state server machines. Placement []string `json:"placement,omitempty"` }
StateServersSpec contains arguments for the EnsureAvailability client API call.
type StateServersSpecs ¶
type StateServersSpecs struct {
Specs []StateServersSpec
}
StateServersSpecs contains all the arguments for the EnsureAvailability API call.
type StateServingInfo ¶
type StateServingInfo struct { APIPort int StatePort int // The state server cert and corresponding private key. Cert string PrivateKey string // The private key for the CA cert so that a new state server // cert can be generated when needed. CAPrivateKey string // this will be passed as the KeyFile argument to MongoDB SystemIdentity string }
StateServingInfo holds information needed by a state server.
type Status ¶
type Status multiwatcher.Status
Status represents the status of an entity. It could be a unit, machine or its agent.
const ( // The entity requires human intervention in order to operate // correctly. StatusError Status = "error" // The entity is actively participating in the environment. // For unit agents, this is a state we preserve for backwards // compatibility with scripts during the life of Juju 1.x. // In Juju 2.x, the agent-state will remain “active” and scripts // will watch the unit-state instead for signals of service readiness. StatusStarted Status = "started" )
const ( // The machine is not yet participating in the environment. StatusPending Status = "pending" // The machine's agent will perform no further action, other than // to set the unit to Dead at a suitable moment. StatusStopped Status = "stopped" // The machine ought to be signalling activity, but it cannot be // detected. StatusDown Status = "down" )
const ( // The machine on which a unit is to be hosted is still being // spun up in the cloud. StatusAllocating Status = "allocating" // The unit agent is downloading the charm and running the install hook. StatusInstalling Status = "installing" // The agent is actively participating in the environment. StatusActive Status = "active" // The unit is being destroyed; the agent will soon mark the unit as “dead”. // In Juju 2.x this will describe the state of the agent rather than a unit. StatusStopping Status = "stopping" // The unit agent has failed in some way,eg the agent ought to be signalling // activity, but it cannot be detected. It might also be that the unit agent // detected an unrecoverable condition and managed to tell the Juju server about it. StatusFailed Status = "failed" )
const ( // The unit is installed and has no problems but is busy getting itself // ready to provide services. StatusBusy Status = "busy" // The unit is unable to offer services because it needs another // service to be up. StatusWaiting Status = "waiting" // The unit needs manual intervention to get back to the Running state. StatusBlocked Status = "blocked" // The unit believes it is correctly offering all the services it has // been asked to offer. StatusRunning Status = "running" )
func TranslateLegacyStatus ¶
TranslateLegacyStatus returns the status value clients expect to see for Juju 1.x.
type StatusParams ¶
type StatusParams struct {
Patterns []string
}
StatusParams holds parameters for the Status call.
type StatusResult ¶
type StatusResult struct { Error *Error Id string Life Life Status Status Info string Data map[string]interface{} }
StatusResult holds an entity status, extra information, or an error.
type StatusResults ¶
type StatusResults struct {
Results []StatusResult
}
StatusResults holds multiple status results.
type StorageInstance ¶
type StorageInstance struct { StorageTag string OwnerTag string Location string StorageName string AvailableSize uint64 TotalSize uint64 Tags []string }
StorageInstance holds data for a storage instance.
type StorageInstanceResult ¶
type StorageInstanceResult struct { Result storage.StorageInstance `json:"result"` Error *Error `json:"error,omitempty"` }
StorageInstanceResult holds the result of an API call to retrieve details of a storage instance.
type StorageInstanceResults ¶
type StorageInstanceResults struct {
Results []StorageInstanceResult `json:"results,omitempty"`
}
StorageInstanceResult holds the result of an API call to retrieve details of multiple storage instances.
type StorageShowResult ¶
type StorageShowResult struct { Result StorageInstance Error ErrorResult }
StorageShowResult holds information about a storage instance or error related to its retrieval.
type StorageShowResults ¶
type StorageShowResults struct {
Results []StorageShowResult
}
StorageShowResults holds a collection of storage instances.
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 UnitStorageInstances ¶
type UnitStorageInstances struct { Instances []storage.StorageInstance `json:"instances,omitempty"` Error *Error `json:"error,omitempty"` }
UnitStorageInstances holds the storage instances for a given unit.
type UnitStorageInstancesResults ¶
type UnitStorageInstancesResults struct {
UnitsStorageInstances []UnitStorageInstances `json:"unitstorageinstances,omitempty"`
}
UnitStorageInstancesResults holds the result of a StorageInstances call for a unit.
type UpdateBehavior ¶
UpdateBehavior contains settings that are duplicated in several places. Let's just embed this instead.
type UserInfo ¶
type UserInfo struct { Username string `json:"username"` DisplayName string `json:"display-name"` CreatedBy string `json:"created-by"` DateCreated time.Time `json:"date-created"` LastConnection *time.Time `json:"last-connection,omitempty"` Disabled bool `json:"disabled"` }
UserInfo holds information on a user.
type UserInfoRequest ¶
type UserInfoRequest struct { Entities []Entity `json:"entities"` IncludeDisabled bool `json:"include-disabled"` }
UserInfoRequest defines the users to return. An empty Entities list indicates that all matching users should be returned.
type UserInfoResult ¶
type UserInfoResult struct { Result *UserInfo `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
UserInfoResult holds the result of a UserInfo call.
type UserInfoResults ¶
type UserInfoResults struct {
Results []UserInfoResult `json:"results"`
}
UserInfoResults holds the result of a bulk UserInfo API call.
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.