~rogpeppe/juju-core/themue-058-debug-log-api

« back to all changes in this revision

Viewing changes to state/interface.go

  • Committer: Frank Mueller
  • Date: 2014-01-23 14:14:49 UTC
  • mfrom: (2152.1.95 juju-core)
  • Revision ID: frank.mueller@canonical.com-20140123141449-b30l57y7gs3wjkpw
debugger: merged trunk and fixed permission and interface problems

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
package state
5
5
 
6
6
import (
 
7
        "launchpad.net/juju-core/environs/config"
 
8
        "launchpad.net/juju-core/instance"
7
9
        "launchpad.net/juju-core/state/api/params"
8
10
        "launchpad.net/juju-core/tools"
9
11
        "launchpad.net/juju-core/version"
149
151
        _ AgentEntity = (*Machine)(nil)
150
152
        _ AgentEntity = (*Unit)(nil)
151
153
)
 
154
 
 
155
// EnvironAccessor defines the methods needed to watch for environment
 
156
// config changes, and read the environment config.
 
157
type EnvironAccessor interface {
 
158
        WatchForEnvironConfigChanges() NotifyWatcher
 
159
        EnvironConfig() (*config.Config, error)
 
160
}
 
161
 
 
162
var _ EnvironAccessor = (*State)(nil)
 
163
 
 
164
// UnitsWatcher defines the methods needed to retrieve an entity (a
 
165
// machine or a service) and watch its units.
 
166
type UnitsWatcher interface {
 
167
        Entity
 
168
        WatchUnits() StringsWatcher
 
169
}
 
170
 
 
171
var _ UnitsWatcher = (*Machine)(nil)
 
172
var _ UnitsWatcher = (*Service)(nil)
 
173
 
 
174
// EnvironMachinesWatcher defines a single method -
 
175
// WatchEnvironMachines.
 
176
type EnvironMachinesWatcher interface {
 
177
        WatchEnvironMachines() StringsWatcher
 
178
}
 
179
 
 
180
var _ EnvironMachinesWatcher = (*State)(nil)
 
181
 
 
182
// InstanceIdGetter defines a single method - InstanceId.
 
183
type InstanceIdGetter interface {
 
184
        InstanceId() (instance.Id, error)
 
185
}
 
186
 
 
187
var _ InstanceIdGetter = (*Machine)(nil)