runner

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector interface {
	Connect(ctx context.Context, hostAddr, hostName, user string) (*executor.Remote, error)
}

Connector is an interface for connecting to a host, and returning remote executer.

type ProcStats

type ProcStats struct {
	Commands int
	Hosts    int
}

ProcStats holds the information about processed commands and hosts.

type Process

type Process struct {
	Concurrency int
	Connector   Connector
	Config      *config.PlayBook
	ColorWriter *executor.ColorizedWriter
	Verbose     bool
	Dry         bool

	Skip []string
	Only []string
	// contains filtered or unexported fields
}

Process is a struct that holds the information needed to run a process. It responsible for running a task on a target hosts.

func (*Process) Run

func (p *Process) Run(ctx context.Context, task, target string) (s ProcStats, err error)

Run runs a task for a set of target hosts. Runs in parallel with limited concurrency, each host is processed in separate goroutine.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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