Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a Manifold that encapsulates a *Tracker and exposes it as an caas,Broker resource.
Types ¶
type Config ¶
type Config struct { ConfigAPI ConfigAPI NewContainerBrokerFunc caas.NewContainerBrokerFunc }
Config describes the dependencies of a Tracker.
It's arguable that it should be called TrackerConfig, because of the heavy use of model config in this package.
type ConfigAPI ¶
type ConfigAPI interface { CloudSpec() (environs.CloudSpec, error) ModelConfig() (*config.Config, error) }
ConfigAPI exposes a model configuration and a watch constructor that allows clients to be informed of changes to the configuration.
type ManifoldConfig ¶
type ManifoldConfig struct { APICallerName string NewContainerBrokerFunc caas.NewContainerBrokerFunc }
ManifoldConfig describes the resources used by a Tracker.
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker loads a caas broker, makes it available to clients, and updates the broker in response to config changes until it is killed.
func NewTracker ¶
NewTracker returns a new Tracker, or an error if anything goes wrong. If a tracker is returned, its Broker() method is immediately usable.
The caller is responsible for Kill()ing the returned Tracker and Wait()ing for any errors it might return.