core

package
v0.0.0-...-b752226 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHClient

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

SSHClient is a SSH client Waooo

func NewSSHClient

func NewSSHClient(host, user, keyFile string, pipes []string) (client *SSHClient, err error)

NewSSHClient return a SSH client

func (*SSHClient) CopyFile

func (c *SSHClient) CopyFile(localPath, remotePath, perm string) error

CopyFile copy file

func (*SSHClient) GetOutput

func (c *SSHClient) GetOutput(cmd string) (output []byte, err error)

GetOutput rerurn command output

func (*SSHClient) GetSession

func (c *SSHClient) GetSession() (session *ssh.Session, err error)

GetSession return a new session

func (*SSHClient) Run

func (c *SSHClient) Run(cmd string) error

Run run cmd

func (*SSHClient) RunOrDie

func (c *SSHClient) RunOrDie(cmd string)

RunOrDie runc cmd, exit on failure

Jump to

Keyboard shortcuts

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