modmanager

package
v0.2.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2023 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Package modmanager provides the module manager for a robot.

Index

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

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) Add

func (mgr *Manager) Add(ctx context.Context, cfg config.Module) error

Add adds and starts a new resource module.

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) Close

func (mgr *Manager) Close(ctx context.Context) error

Close terminates module connections and processes.

func (*Manager) IsModularResource

func (mgr *Manager) IsModularResource(name resource.Name) bool

IsModularResource returns true if an existing resource IS handled by a module.

func (*Manager) Provides

func (mgr *Manager) Provides(cfg config.Component) bool

Provides returns true if a component/service config WOULD be handled by a module.

func (*Manager) ReconfigureResource

func (mgr *Manager) ReconfigureResource(ctx context.Context, cfg config.Component, deps []string) error

ReconfigureResource updates/reconfigures a modular component with a new configuration.

func (*Manager) RemoveResource

func (mgr *Manager) RemoveResource(ctx context.Context, name resource.Name) error

RemoveResource requests the removal of a resource from a module.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL