Documentation
¶
Index ¶
- type Manager
- func (m *Manager) Launch(exec string, key string, name plugin.Name, options *types.Any) error
- func (m *Manager) Rules() []launch.Rule
- func (m *Manager) Start(rules []launch.Rule) error
- func (m *Manager) StartPluginsFromSpecs(specs []types.Spec, onError func(error) bool) error
- func (m *Manager) Stop()
- func (m *Manager) Terminate(lookup []string) error
- func (m *Manager) TerminateAll() error
- func (m *Manager) TerminateRunning() error
- func (m *Manager) WaitForAllShutdown()
- func (m *Manager) WaitStarting()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages the plugins startup, stop, etc.
func ManagePlugins ¶
func ManagePlugins(rules []launch.Rule, plugins func() discovery.Plugins, mustAll bool, scanInterval time.Duration) (*Manager, error)
ManagePlugins returns a manager that can manage the start up and stopping of plugins.
func (*Manager) StartPluginsFromSpecs ¶
StartPluginsFromSpecs starts up the plugins referenced in the specs
func (*Manager) Terminate ¶
Terminate stops the plugins. Note this is accomplished by sending a signal TERM to the process found at the lookup.pid file. For inproc plugins, this will effectively kill all the plugins that run in that process. TODO - selectively terminate inproc plugins without taking down the process.
func (*Manager) TerminateAll ¶
TerminateAll terminates all the plugins.
func (*Manager) TerminateRunning ¶
TerminateRunning terminates those that have been started.
func (*Manager) WaitForAllShutdown ¶
func (m *Manager) WaitForAllShutdown()
WaitForAllShutdown blocks until all the plugins stopped.
func (*Manager) WaitStarting ¶
func (m *Manager) WaitStarting()
WaitStarting blocks until a current batch of plugins completed starting up.