Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // InterfaceSpec is the current name and version of the Instance API. InterfaceSpec = spi.InterfaceSpec{ Name: "Manager", Version: "0.1.0", } )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
Controllers() (map[string]controller.Controller, error)
Groups() (map[group.ID]group.Plugin, error)
Metadata() (map[string]metadata.Plugin, error)
Manager
Start() (<-chan struct{}, error)
Stop()
}
Backend is the admin / server interface
func NewManager ¶
NewManager returns the manager which depends on other services to coordinate and manage the plugins in order to ensure the infrastructure state matches the user's spec.
type Leadership ¶
type Leadership interface {
// IsLeader returns true only if for certain this is a leader. False if not or unknown.
IsLeader() (bool, error)
// LeaderLocation returns the location of the leader
LeaderLocation() (*url.URL, error)
}
Leadership is the interface for getting information about the current leader node
type Manager ¶
type Manager interface {
Leadership
// Enforce enforces infrastructure state to match that of the specs
Enforce(specs []types.Spec) error
// Inspect returns the current state of the infrastructure
Inspect() ([]types.Object, error)
// Terminate destroys all resources associated with the specs
Terminate(specs []types.Spec) error
}
Manager is the interface for interacting locally or remotely with the manager
type Options ¶
type Options struct {
// Name the manager runs as
Name plugin.Name
// Name of the Group plugin
Group plugin.Name
// Name of the Metadata plugin. Must be pointing to Updatable
Metadata plugin.Name
// Plugins for plugin lookup
Plugins func() discovery.Plugins `json:"-" yaml:"-"`
// Leader is the leader detector
Leader leader.Detector `json:"-" yaml:"-"`
// LeaderStore persists leadership information
LeaderStore leader.Store `json:"-" yaml:"-"`
// SpecStore persists user specs
SpecStore store.Snapshot `json:"-" yaml:"-"`
// MetadataStore persists var information
MetadataStore store.Snapshot `json:"-" yaml:"-"`
// MetadataRefreshInterval is the interval to check for updates to metadata
MetadataRefreshInterval types.Duration
}
Options capture the options for starting up the plugin.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.