engine

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Konnect

type Konnect struct {
	Global        *proxy.SSHProxy `yaml:"-"`
	ProxyChan     chan bool       `yaml:"-"`
	CompletedChan chan bool       `yaml:"-"`
	Hosts         map[string]*proxy.SSHProxy
	Tasks         map[string]*task.SSHTask
}

Konnect is a collection of SSHProxy objects.

func Init

func Init(filename string) (*Konnect, error)

Init - Create a new Konnect object.

func New

func New() *Konnect

New - Create a new Konnect object.

func (*Konnect) CheckHosts

func (k *Konnect) CheckHosts(hosts []string) error

CheckHosts - Ensure that the given host names exist.

func (*Konnect) GetHost added in v1.0.0

func (k *Konnect) GetHost(name string) (*proxy.SSHProxy, error)

GetHost - Get an SSHProxy object by name.

func (*Konnect) GetHostNames added in v1.0.0

func (k *Konnect) GetHostNames() []string

GetHostNames - Get host names in sorted order (asc).

func (*Konnect) GetTask added in v1.0.0

func (k *Konnect) GetTask(name string) (*task.SSHTask, error)

GetTask - Get an SSHTask object by name.

func (*Konnect) GetTaskNames added in v1.0.0

func (k *Konnect) GetTaskNames() []string

GetTaskNames - Get task names in sorted order (asc).

func (*Konnect) LoadFromFile

func (k *Konnect) LoadFromFile(filename string) error

LoadFromFile - Load and validate SSHProxy objects from a yaml config file.

func (*Konnect) MarshalHosts added in v1.0.0

func (k *Konnect) MarshalHosts() ([]byte, error)

MarshalHosts - Marshal SSHProxy objects to a byte string.

func (*Konnect) MarshalTasks added in v1.0.0

func (k *Konnect) MarshalTasks() ([]byte, error)

MarshalTasks - Marshal SSHTask objects to a byte string.

func (*Konnect) Status

func (k *Konnect) Status(hosts []string)

Status - Check the status of one or more hosts.

func (*Konnect) TestConnection

func (k *Konnect) TestConnection(host string)

TestConnection - Test proxy ssh connection.

func (*Konnect) UnmarshalGlobal added in v1.0.0

func (k *Konnect) UnmarshalGlobal(byteStr []byte) error

UnmarshalGlobal - Unmarshal global proxy config from a byte string.

func (*Konnect) UnmarshalHosts added in v1.0.0

func (k *Konnect) UnmarshalHosts(byteStr []byte) error

UnmarshalHosts - Unmarshal SSHProxy objects from a byte string.

func (*Konnect) UnmarshalTasks added in v1.0.0

func (k *Konnect) UnmarshalTasks(byteStr []byte) error

UnmarshalTasks - Unmarshal SSHTask objects from a byte string.

Jump to

Keyboard shortcuts

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