executor

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: LGPL-2.1 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHostNotExists = errors.New("host not exists")
	ErrInvalidClient = errors.New("invalid client kind")
)

Functions

This section is empty.

Types

type AggregateStats

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

func NewStats

func NewStats() *AggregateStats

func (*AggregateStats) Decrement

func (as *AggregateStats) Decrement(what Zone, host string)

func (*AggregateStats) GetCustomStats

func (as *AggregateStats) GetCustomStats(host, which string) (any, bool)

func (*AggregateStats) Increment

func (as *AggregateStats) Increment(what Zone, host string)

func (*AggregateStats) SetCustomStats

func (as *AggregateStats) SetCustomStats(which string, what any, host string)

func (*AggregateStats) Summarize

func (as *AggregateStats) Summarize(host string) map[string]int64

func (*AggregateStats) UpdateCustomStats

func (as *AggregateStats) UpdateCustomStats(which string, what any, host string)

type Executor

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

func NewExecutor

func NewExecutor(lg *zap.Logger, inventory *inv.Manager, passwords *secret.PasswordManager) *Executor

func (*Executor) Cleanup

func (e *Executor) Cleanup() error

func (*Executor) GetClient

func (e *Executor) GetClient(name string) (client.IClient, error)

func (*Executor) LoadSources

func (e *Executor) LoadSources(sources ...string) error

LoadSources builds the given source client.IClient, if the client.IClient already built, do nothing

func (*Executor) RemoveClient added in v0.2.2

func (e *Executor) RemoveClient(name string) (bool, error)

type Zone

type Zone int
const (
	Processed Zone = iota + 1
	Ok
	Dark
	Changed
	Skipped
	Rescued
	Ignored
)

func (Zone) String

func (z Zone) String() string

Directories

Path Synopsis
ssh

Jump to

Keyboard shortcuts

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