executor

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: GPL-3.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
}

func New

func New(opts ...Option) *Executor

func (Executor) ExecuteOnHosts added in v0.0.22

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

func (Executor) ExecuteOperations added in v0.0.9

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

func (Executor) LoadHostsFile added in v0.0.23

func (e Executor) LoadHostsFile(filename string) (map[string][]remote.Host, error)

LoadHostsFile reads a hosts file and returns a map from role name to parsed Host structs. The file is expected to be a flat YAML map keyed by role, for example:

all:
  - ops:PASSWORD@127.0.0.1:9001
main:
  - ops:PASSWORD@127.0.0.1:9002

The outer "hosts:" wrapper that the legacy combined format used is intentionally not accepted; hosts.yaml is dedicated to host entries.

func (Executor) LoadTasksFile added in v0.0.23

func (e Executor) LoadTasksFile(filename string) ([]operation.Operation, error)

LoadTasksFile reads a task file and returns the list of operations to execute. Each entry's name defaults to DefaultName() and its role defaults to RoleAll when the corresponding YAML field is empty.

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 is kept.

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