agent

package
v0.0.0-...-1ecb045 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const KeyLength = 2048 //bits

Variables

View Source
var Names = []string{}/* 1633 elements not displayed */

Original word list: <http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt>

Functions

func GenerateKeyPair

func GenerateKeyPair() (privateKey, publicKey string, err error)

func GetConfig

func GetConfig(user, keyFile string) (*ssh.ClientConfig, error)

Returns an ssh.ClientConfig given a username and key filepath

func GetWord

func GetWord(prefix string) string

func NewWardenClient

func NewWardenClient(target string, handler Handler, creds credentials.TransportCredentials) (*wardenClient, error)

func Run

func Run(worker Worker, err error)

TODO: also pass in the Warden server IP address

func RunCmd

func RunCmd(c *ssh.Client, cmd, stdin string) (stdout, stderr string, err error)

Runs the given command on the ssh.Client and provides stdin to the processes on the remote Returns stdout and stderr; err is != nil if exit status is != 0

func WordCounts

func WordCounts() (m map[rune]int)

Types

type Handler

type Handler interface {
	Handle(req *warden.ClusterRequest)
}

type WardenClient

type WardenClient interface {
	PublishUpdate(ad *warden.ClusterAdvertisement) error
	Teardown()
}

type Worker

type Worker interface {
	Bind(client WardenClient)
	Handle(req *warden.ClusterRequest)
	Start()
	Teardown()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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