executor

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor added in v0.0.9

type Executor struct {
	// contains filtered or unexported fields
}

Executor orchestrates remote operations across multiple hosts.

func New

func New(opts ...Option) *Executor

New creates a new Executor with the given options.

func (Executor) ExecuteOperation added in v0.0.9

func (e Executor) ExecuteOperation(hostGroup map[string][]remote.Host, pool *remote.HostPool, op operation.Operation) error

ExecuteOperation runs a single operation on all matching hosts in the group. It respects the operation's Role field: if Role is "all", it runs on all hosts; otherwise, it runs only on hosts in the specified role group.

func (Executor) ExecuteOperations added in v0.0.9

func (e Executor) ExecuteOperations(hostGroup map[string][]remote.Host, ops []operation.Operation) error

ExecuteOperations runs a sequence of operations on the host group. Each operation is executed on all hosts that match the operation's Role.

func (Executor) LoadConfig added in v0.0.20

func (e Executor) LoadConfig(filename string) (map[string][]remote.Host, []operation.Operation, error)

LoadConfig reads and parses the configuration file, returning the host groups and operation list. The filename can be an absolute or relative path.

type Option

type Option func(e *Executor)

Option configures an Executor.

func WithMaxProcs

func WithMaxProcs(maxProcs int) Option

WithMaxProcs sets the maximum number of concurrent operations. A value of 0 or negative is ignored and the default (1) is used.

func WithVerboseLevel added in v0.0.19

func WithVerboseLevel(verboseLevel int) Option

WithVerboseLevel sets the verbosity level for executor output.

Jump to

Keyboard shortcuts

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