Documentation
¶
Index ¶
- Constants
- Variables
- type Action
- type Archive
- type Commander
- type Config
- type Provision
- type Recipe
- type Response
- type SSHCommander
- func (sshCmd *SSHCommander) Close() error
- func (sshCmd *SSHCommander) Copy(src io.Reader, size int64, dst string, mode os.FileMode) error
- func (sshCmd *SSHCommander) CopyFile(src, dst string, mode os.FileMode) error
- func (sshCmd *SSHCommander) Host() (host, port string)
- func (sshCmd *SSHCommander) Load(target string, here io.Writer) error
- func (sshCmd *SSHCommander) LoadFile(target, here string, mode os.FileMode) error
- func (sshCmd *SSHCommander) Mkdir(path string) error
- func (sshCmd *SSHCommander) Run(cmd string) (output string, err error)
- func (sshCmd *SSHCommander) RunQuiet(cmd string) (err error)
- func (sshCmd *SSHCommander) Shell() (err error)
- func (sshCmd *SSHCommander) StepDown()
- func (sshCmd *SSHCommander) Stream(cmd string) (<-chan Response, error)
- func (sshCmd *SSHCommander) Sudo() SudoSession
- type SudoSession
Constants ¶
View Source
const (
TMP_REMOTE_DIR = "/tmp/.machine"
)
Variables ¶
View Source
var (
ErrCopyNotRegular = errors.New("Can only copy regular file")
)
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Archive ¶
type Commander ¶
type Commander interface { // Report host this Commander connects to Host() (host, port string) // Load file from target to here Load(target string, here io.Writer) error // Load file from target to here LoadFile(target, here string, mode os.FileMode) error // Copy file from src to dst Copy(src io.Reader, size int64, dst string, mode os.FileMode) error // Copy file from src to dst CopyFile(src, dst string, mode os.FileMode) error // Create full directory Mkdir(path string) error // Run command and retreive combinded output Run(cmd string) (string, error) // Run command and stay quiet RunQuiet(cmd string) error // Obtain a login shell Shell() error // Run command and stream combined output Stream(cmd string) (<-chan Response, error) // Elevate commander role and return a Deferr Target Sudo() SudoSession // Close Connection and cleanup Close() error }
type Provision ¶
type SSHCommander ¶
type SSHCommander struct {
// contains filtered or unexported fields
}
func (*SSHCommander) Close ¶
func (sshCmd *SSHCommander) Close() error
func (*SSHCommander) CopyFile ¶
func (sshCmd *SSHCommander) CopyFile(src, dst string, mode os.FileMode) error
func (*SSHCommander) Host ¶
func (sshCmd *SSHCommander) Host() (host, port string)
func (*SSHCommander) LoadFile ¶
func (sshCmd *SSHCommander) LoadFile(target, here string, mode os.FileMode) error
func (*SSHCommander) Mkdir ¶
func (sshCmd *SSHCommander) Mkdir(path string) error
func (*SSHCommander) RunQuiet ¶
func (sshCmd *SSHCommander) RunQuiet(cmd string) (err error)
func (*SSHCommander) Shell ¶
func (sshCmd *SSHCommander) Shell() (err error)
func (*SSHCommander) StepDown ¶
func (sshCmd *SSHCommander) StepDown()
func (*SSHCommander) Stream ¶
func (sshCmd *SSHCommander) Stream(cmd string) (<-chan Response, error)
func (*SSHCommander) Sudo ¶
func (sshCmd *SSHCommander) Sudo() SudoSession
type SudoSession ¶
type SudoSession interface {
// Step down from sudo status
StepDown()
}
Click to show internal directories.
Click to hide internal directories.