Documentation
¶
Index ¶
- type Directive
- type Manager
- func (mgr *Manager) Reload(ctx context.Context, logger *slog.Logger, inv inventory.Store)
- func (mgr *Manager) ReloadAndRunAll(ctx context.Context, logger *slog.Logger, inv inventory.Store)
- func (mgr *Manager) ReloadDirectives(ctx context.Context)
- func (mgr *Manager) ReloadModules(ctx context.Context, logger *slog.Logger)
- func (mgr *Manager) ReloadVariables(ctx context.Context, logger *slog.Logger, paths []string, hostVars VariableMap, ...) VariableSlice
- func (mgr *Manager) RunAll(ctx context.Context, logger *slog.Logger)
- func (mgr *Manager) RunDirective(ctx context.Context, ds Directive) error
- func (mgr *Manager) RunDirectives(ctx context.Context, logger *slog.Logger)
- func (mgr *Manager) RunModule(ctx context.Context, logger *slog.Logger, mod Module) error
- func (mgr *Manager) RunModules(ctx context.Context, logger *slog.Logger)
- func (mgr *Manager) String() string
- type Module
- type VariableMap
- type VariableSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directive ¶ added in v0.0.4
type Directive struct {
// contains filtered or unexported fields
}
Directive is a wrapper struct that encapsulates an inventory.Directive
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager contains fields related to track and execute runnable modules and statistics.
func NewManager ¶
NewManager returns a new Manager struct instantiated with the given ID
func (*Manager) Reload ¶
Reload accepts a struct that fulfills the inventory.Store interface and reloads the hosts modules/directives from the inventory
func (*Manager) ReloadAndRunAll ¶ added in v0.2.0
ReloadAndRunAll is a wrapper function to reload from the specified inventory, populate some run specific context, and initiate a run of all managed modules
func (*Manager) ReloadDirectives ¶ added in v0.0.4
ReloadDirectives reloads the manager's directives from the specified inventory.
func (*Manager) ReloadModules ¶ added in v0.0.4
ReloadModules reloads the manager's modules from the specified inventory.
func (*Manager) ReloadVariables ¶ added in v0.5.0
func (mgr *Manager) ReloadVariables(ctx context.Context, logger *slog.Logger, paths []string, hostVars VariableMap, hostTemplates []string) VariableSlice
func (*Manager) RunAll ¶
RunAll runs all of the Directives being managed by the Manager, followed by all of the Modules being managed by the Manager.
func (*Manager) RunDirective ¶ added in v0.0.4
RunDirective is responsible for actually executing a directive, using the `shell` package.
func (*Manager) RunDirectives ¶
RunDirectives runs all of the directive scripts being managed by the Manager
func (*Manager) RunModule ¶ added in v0.0.4
RunModule is responsible for actually executing a module, using the `shell` package.
func (*Manager) RunModules ¶
RunModules runs all of the modules being managed by the Manager
type Module ¶ added in v0.0.4
type Module struct { Variables VariableSlice // contains filtered or unexported fields }
Module is a wrapper struct that encapsulates an inventory.Module, and exports a `Variables`, which a `VariableSlce`, where each item is a variable for the module in `key=value` form (the same as returned by `os.Environ()`)
type VariableMap ¶ added in v0.2.0
type VariableMap = shell.VariableMap
type VariableSlice ¶ added in v0.2.0
type VariableSlice = shell.VariableSlice