common

package
v0.0.0-...-0ef6a52 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeKeyring

func MakeKeyring(key, agentSock string, useAgent bool) []ssh.Signer

MakeKeyring Makes an ssh key ring for authentication

func SetAgentSock

func SetAgentSock(as string) func(*Options)

SetAgentSock Sets the ssh agent socket

func SetCmd

func SetCmd(c string) func(*Options)

SetCmd Sets the command to be run on the ssh session

func SetDestination

func SetDestination(d string) func(*Options)

SetDestination Sets the destination file/dir for scp

func SetIsRecursive

func SetIsRecursive(r bool) func(*Options)

SetIsRecursive Sets whether we want to a recursive scp

func SetKey

func SetKey(k string) func(*Options)

SetKey Sets the key we are going to use to ssh connect

func SetMachines

func SetMachines(m []string) func(*Options)

SetMachines Sets the machines that we are going to run command or copy a file to

func SetOp

func SetOp(o string) func(*Options)

SetOp Sets whether we want to run a command or scp

func SetPort

func SetPort(p int) func(*Options)

SetPort Sets port for ssh session

func SetSource

func SetSource(s string) func(*Options)

SetSource Sets the source file/dir for scp

func SetTimeout

func SetTimeout(t int) func(*Options)

SetTimeout Sets the connection timeout

func SetUseAgent

func SetUseAgent(u bool) func(*Options)

SetUseAgent Sets whether we want to use the ssh agent

func SetUser

func SetUser(u string) func(*Options)

SetUser Sets user for ssh session

func SetVerbose

func SetVerbose(v bool) func(*Options)

SetVerbose Sets high verbosity

Types

type Options

type Options struct {
	Machines    []string
	Port        int
	Timeout     int
	User        string
	Cmd         string
	Key         string
	Src         string
	Dst         string
	AgentSock   string
	Op          string
	UseAgent    bool
	IsRecursive bool
	IsVerbose   bool
}

Options Main options struct

Jump to

Keyboard shortcuts

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