utils

package
v1.0.52 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GatherExpect

func GatherExpect(batcher []expect.Batcher, timeout time.Duration, ssh *ssh.Client) ([]expect.BatchRes, error)

GatherExpect initializes expect with our SSH connection and gathers results of the batch.

func SSHClient

func SSHClient(c SSHConfig) (*ssh.Client, error)

SSHClient dials up our target device.

func SendEmail

func SendEmail(c *configuration.Config, subject, message string) error

SendEmail to user - Consider using a library.

func SimpleBatcher

func SimpleBatcher(definition [][]string) ([]expect.Batcher, error)

SimpleBatcher implements a straight forward send/receive pattern.

func VariableBatcher

func VariableBatcher(definition [][]string) ([]expect.Batcher, error)

VariableBatcher uses send and receive, with the possibility to skip steps. TODO: Do we need https://godoc.org/google.golang.org/grpc/codes ?

func WriteFile

func WriteFile(workspace, config, name string) error

WriteFile saves output to a file

func WriteRunResult

func WriteRunResult(filename string, count int) error

WriteRunResult will write the count value into the runresult.log file and update the timestamp each run.

Types

type SSHConfig

type SSHConfig struct {
	User          string
	Pass          string
	Host          string
	Ciphers       []string
	AuthMethod    string
	PrivateKey    string
	AllowInsecure bool
	SSHTimeout    time.Duration
}

SSHConfig type to map SSH Configs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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