factory

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

Factory of shell commands executors. Depending on the options, will create local or SSH executors.

func NewFactory

func NewFactory(opts Options, logger *zap.SugaredLogger) (Factory, error)

func NewTestFactory

func NewTestFactory() Factory

NewTestFactory creates a factory for testing, that only returns local command executors.

func (Factory) GetByHost

func (f Factory) GetByHost(host string) (cmd.Executor, error)

GetByHost returns a command executor for a given host.

type Options

type Options struct {
	UseSSH bool
	SSH    ssh.Options `yaml:"ssh"`
	Debug  bool
}

Jump to

Keyboard shortcuts

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