sessions

package
v0.0.0-...-8df3848 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapCmd

func MapCmd(hosts hosts.Group, username string, keypath string, command string, results chan SSHResponse)

MapCmd takes the details for a command and maps it, via SSH, across a list of hosts

func MapCopy

func MapCopy(hosts hosts.Group, username string, keypath string, localPath string, remotePath string, results chan SFTPResponse)

MapCopy takes the details for a file transfer and maps the file transfer across a list of hosts

Types

type SFTPConnnection

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

SFTPConnnection is a container for the pieces necessary to hold an SFTP connection open in a goroutine

func InitSFTPConnection

func InitSFTPConnection(s *SSHConnection) (*SFTPConnnection, error)

InitSFTPConnection returns an SFTP client from an existing SSHSession

func (*SFTPConnnection) TearDown

func (s *SFTPConnnection) TearDown()

TearDown closes all of the connections in an SFTP connection

type SFTPResponse

type SFTPResponse struct {
	Host   string
	Result string
	Err    error
}

SFTPResponse contains the result of copying a file to a host via SFTP

type SSHConnection

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

SSHConnection is a container for the pieces necessary to hold an SSH connection open in a goroutine

func InitSSHConnection

func InitSSHConnection(address string, username string, keypath string) (*SSHConnection, error)

InitSSHConnection takes host details and returns an SSHConnection

func (*SSHConnection) TearDown

func (s *SSHConnection) TearDown()

TearDown closes all of the connections in an SSH connection

type SSHResponse

type SSHResponse struct {
	Host   string
	Result string
	Err    error
}

SSHResponse contains the result of running a command on a host via SSH

Jump to

Keyboard shortcuts

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