runner

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 15 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 ProcResp added in v1.1.0

type ProcResp struct {
	Vars     map[string]string
	Commands int
	Hosts    int
}

ProcResp 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 ProcResp, 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. Returns ProcResp with the information about processed commands and hosts plus vars from all thr commands.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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