controller

package
v0.0.0-...-c5da712 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(m types.Machine) (*ssh.Client, *ssh.Session, error)

NewClient returns a new ssh client associated to a machine.

func NewSCPClient

func NewSCPClient(m types.Machine) scp.Client

NewSCPClient returns a SCP client associated to the machine.

func ReceiveFile

func ReceiveFile(m types.Machine, src, dst string) error

func SSHCommand

func SSHCommand(m types.Machine, cmd string) (string, error)

func SSHDialTimeout

func SSHDialTimeout(network, addr string, config *ssh.ClientConfig, timeout time.Duration) (*ssh.Client, error)

SSHDialTimeout dials in SSH with a timeout. It sends periodic keepalives such as the remote host don't make the go client sit on Wait().

func SendFile

func SendFile(m types.Machine, src, dst, permission string) error

Types

type Conn

type Conn struct {
	net.Conn
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

func (*Conn) Read

func (c *Conn) Read(b []byte) (int, error)

func (*Conn) Write

func (c *Conn) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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