23
// Machines holds the arguments for making an API call working on
24
// multiple machine entities.
25
type Machines struct {
29
// MachineSetStatus holds a machine id, status and extra info.
30
type MachineSetStatus struct {
36
// MachinesSetStatus holds the parameters for making a Machiner.SetStatus call.
37
type MachinesSetStatus struct {
38
Machines []MachineSetStatus
41
// NotifyWatchResult holds an NotifyWatcher id and an error (if any).
42
type NotifyWatchResult struct {
43
NotifyWatcherId string
47
// NotifyWatchResults holds the results for any API call which ends up
48
// returning a list of NotifyWatchers
49
type NotifyWatchResults struct {
50
Results []NotifyWatchResult
53
// A NotifyWatcher will send events when something changes.
54
// It does not send content for those changes.
55
type NotifyWatcher interface {
56
Changes() <-chan struct{}
61
// Agent identifies a single agent
66
// Agents holds a list of Tags for Unit- and Machine-Agents.
71
23
// AddRelation holds the parameters for making the AddRelation call.
72
24
// The endpoints specified are unordered.
73
25
type AddRelation struct {
89
// Life describes the lifecycle state of an entity ("alive", "dying"
99
// MachineLifeResult holds the result of Machiner.Life for a single machine.
100
type MachineLifeResult struct {
105
// MachinesLifeResults holds the results of a Machiner.Life call.
106
type MachinesLifeResults struct {
107
Machines []MachineLifeResult
110
// MachineAgentGetMachinesResults holds the results of a
111
// machineagent.API.GetMachines call.
112
type MachineAgentGetMachinesResults struct {
113
Machines []MachineAgentGetMachinesResult
116
// MachineJob values define responsibilities that machines may be
117
// expected to fulfil.
118
type MachineJob string
121
JobHostUnits MachineJob = "JobHostUnits"
122
JobManageEnviron MachineJob = "JobManageEnviron"
123
JobManageState MachineJob = "JobManageState"
126
// MachineAgentGetMachinesResult holds the results of a
127
// machineagent.API.GetMachines call for a single machine.
128
type MachineAgentGetMachinesResult struct {
134
41
// ServiceDeploy holds the parameters for making the ServiceDeploy call.
135
42
type ServiceDeploy struct {
136
43
ServiceName string
222
129
ServiceName string
225
// AgentTools describes the tools for a given Agent. This is mostly a flattened
226
// state.Tools description, plus an agent Tag field.
227
type AgentTools struct {
238
// AgentToolsResult holds the tools and possibly error for a given Agent request
239
type AgentToolsResult struct {
240
AgentTools AgentTools
244
// AgentToolsResults is a list of tools for various requested agents.
245
type AgentToolsResults struct {
246
Tools []AgentToolsResult
249
// Set what tools are being run for multiple agents
250
type SetAgentTools struct {
251
AgentTools []AgentTools
254
// The result of setting the tools for one agent
255
type SetAgentToolsResult struct {
260
// The result of setting the tools for many agents
261
type SetAgentToolsResults struct {
262
Results []SetAgentToolsResult
265
// PasswordChanges holds the parameters for making a SetPasswords call.
266
type PasswordChanges struct {
267
Changes []PasswordChange
270
// PasswordChange specifies a password change for the entity
271
// with the given tag.
272
type PasswordChange struct {
277
132
// Creds holds credentials for identifying an entity.
278
133
type Creds struct {
283
// NotifyWatcherId holds the id of an NotifyWatcher.
284
type NotifyWatcherId struct {
285
NotifyWatcherId string
288
// LifecycleWatchResults holds the results of API calls
289
// that watch the lifecycle of a set of objects.
290
// It is used both for the initial Watch request
291
// and for subsequent Next requests.
292
type LifecycleWatchResults struct {
293
// LifeCycleWatcherId holds the id of the newly
294
// created watcher. It will be empty for a Next
296
LifecycleWatcherId string
298
// Ids holds the list of entity ids.
299
// For a Watch request, it holds all entity ids being
300
// watched; for a Next request, it holds the ids of those
301
// that have changed.
305
// EnvironConfigWatchResults holds the result of
306
// State.WatchEnvironConfig(): id of the created EnvironConfigWatcher,
307
// along with the current environment configuration. It is also used
308
// for the result of EnvironConfigWatcher.Next(), when it contains the
309
// changed config (EnvironConfigWatcherId will be empty in this case).
310
type EnvironConfigWatchResults struct {
311
EnvironConfigWatcherId string
312
Config map[string]interface{}
315
// AllWatcherId holds the id of an AllWatcher.
316
type AllWatcherId struct {
320
// AllWatcherNextResults holds deltas returned from calling AllWatcher.Next().
321
type AllWatcherNextResults struct {
325
// Password holds a password.
326
type Password struct {
330
// Unit holds details of a unit.
333
// TODO(rog) other unit attributes.
336
// User holds details of a user.
338
// This is a placeholder for any information
339
// that may be associated with a user in the
343
138
// GetAnnotationsResults holds annotations associated with an entity.
344
139
type GetAnnotationsResults struct {
345
140
Annotations map[string]string