ssh

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Copyright (c) 2019 Stefaan Coussement MIT License

more info: https://github.com/elebertus/golang-exec

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Type       string // must be "ssh"
	Host       string
	Port       uint16
	User       string
	Password   string
	PubKeyPath string
	PubKey     ssh.AuthMethod
	Insecure   bool
}

type Error

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

func (*Error) Command

func (e *Error) Command() string

func (*Error) Error

func (e *Error) Error() string

func (*Error) ExitCode

func (e *Error) ExitCode() int

func (*Error) Script

func (e *Error) Script() *script.Script

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Runner

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

func New

func New(connection interface{}, s *script.Script, arguments interface{}) (*Runner, error)

func (*Runner) Close

func (r *Runner) Close() error

func (*Runner) ExitCode

func (r *Runner) ExitCode() int

func (*Runner) Run

func (r *Runner) Run() error

func (*Runner) SetStderrWriter

func (r *Runner) SetStderrWriter(stderr io.Writer)

func (*Runner) SetStdoutWriter

func (r *Runner) SetStdoutWriter(stdout io.Writer)

func (*Runner) Start

func (r *Runner) Start() error

func (*Runner) StderrPipe

func (r *Runner) StderrPipe() (io.Reader, error)

func (*Runner) StdoutPipe

func (r *Runner) StdoutPipe() (io.Reader, error)

func (*Runner) Wait

func (r *Runner) Wait() error

Jump to

Keyboard shortcuts

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