runner

package
v0.0.0-...-d18c366 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 8

Documentation

Overview

Package runner implements various plugins that can be used to defined the strategy to execute tasks over hosts

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParallelRunner

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

ParallelRunner will run each task over the hosts in parallel using a goroutines per Host

func Parallel

func Parallel() *ParallelRunner

Parallel returns an instantiated ParallelRunner

func (ParallelRunner) Close

func (r ParallelRunner) Close() error

Close implements the Close method of the gornir.Runner interface

func (ParallelRunner) Run

func (r ParallelRunner) Run(ctx context.Context, logger gornir.Logger, processors gornir.Processors, task gornir.Task, hosts map[string]*gornir.Host, results chan *gornir.JobResult) error

Run implements the Run method of the gornir.Runner interface

func (ParallelRunner) Wait

func (r ParallelRunner) Wait() error

Wait implements the Wait method of the gornir.Runner interface

type SortedRunner

type SortedRunner struct {
}

SortedRunner will sort the hosts alphabetically and execute the task over each host in sequence without any parallelization

func Sorted

func Sorted() *SortedRunner

Sorted returns an instantiated SortedRunner

func (SortedRunner) Close

func (r SortedRunner) Close() error

Close implements the Close method of the gornir.Runner interface

func (SortedRunner) Run

func (r SortedRunner) Run(ctx context.Context, logger gornir.Logger, processors gornir.Processors, task gornir.Task, hosts map[string]*gornir.Host, results chan *gornir.JobResult) error

Run implements the Run method of the gornir.Runner interface

func (SortedRunner) Wait

func (r SortedRunner) Wait() error

Wait implements the Wait method of the gornir.Runner interface

Jump to

Keyboard shortcuts

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