multi

package
v3.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultKeyFunc

func DefaultKeyFunc(account cartogram.Account) (string, cartogram.Tags)

DefaultKeyFunc uses the account's ID as the key, and passes through its tags

Types

type ExecResult

type ExecResult struct {
	Tags     cartogram.Tags `json:"tags"`
	Error    error          `json:"error"`
	ExitCode int            `json:"exitcode"`
	StdOut   string         `json:"stdout"`
	StdErr   string         `json:"stderr"`
}

ExecResult is based on creds.ExecResult but adds account tags

type Processor

type Processor struct {
	Grapher      travel.Grapher
	Options      travel.TraverseOptions
	Args         []string
	RoleNames    []string
	ProfileNames []string
	SkipConfirm  bool
	KeyFunc      func(cartogram.Account) (string, cartogram.Tags)
}

Processor defines the settings for parallel processing

func (Processor) Exec

func (p Processor) Exec(cmd []string) (map[string]ExecResult, error)

Exec runs a command against a set of accounts

func (Processor) ExecString

func (p Processor) ExecString(cmd string) (map[string]ExecResult, error)

ExecString runs a command string against a set of accounts

func (Processor) ParseKey

func (p Processor) ParseKey(account cartogram.Account) (string, cartogram.Tags)

ParseKey derives an output key from an account

Jump to

Keyboard shortcuts

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