Documentation ¶
Overview ¶
Package modmanager provides the module manager for a robot.
Index ¶
- func DepsToNames(deps registry.Dependencies) []string
- func NewManager(r robot.LocalRobot) (modmaninterface.ModuleManager, error)
- type Manager
- func (mgr *Manager) Add(ctx context.Context, cfg config.Module) error
- func (mgr *Manager) AddResource(ctx context.Context, cfg config.Component, deps []string) (interface{}, error)
- func (mgr *Manager) Close(ctx context.Context) error
- func (mgr *Manager) IsModularResource(name resource.Name) bool
- func (mgr *Manager) Provides(cfg config.Component) bool
- func (mgr *Manager) ReconfigureResource(ctx context.Context, cfg config.Component, deps []string) error
- func (mgr *Manager) RemoveResource(ctx context.Context, name resource.Name) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DepsToNames ¶
func DepsToNames(deps registry.Dependencies) []string
DepsToNames converts a dependency list to a simple string slice.
func NewManager ¶
func NewManager(r robot.LocalRobot) (modmaninterface.ModuleManager, error)
NewManager returns a Manager.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the root structure for the module system.
func (*Manager) AddResource ¶
func (mgr *Manager) AddResource(ctx context.Context, cfg config.Component, deps []string) (interface{}, error)
AddResource tells a component module to configure a new component.
func (*Manager) IsModularResource ¶
IsModularResource returns true if an existing resource IS handled by a module.
func (*Manager) Provides ¶
Provides returns true if a component/service config WOULD be handled by a module.
Click to show internal directories.
Click to hide internal directories.