ssh

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunGobStreamer

func RunGobStreamer[T any](c *Client, cmd string, stdin io.Reader, callback func(T)) error

RunGobStreamer runs command over SSH, while parsing its stdout as gob stream. No method, because can't use generics on methods. Do we actually need generics to make the ssh package unaware of actual objects being passed?

Types

type Client

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

func Connect

func Connect(target string) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Run

func (c *Client) Run(cmd string) (string, error)

func (*Client) RunLineStreamer

func (c *Client) RunLineStreamer(cmd string, toWrite []byte, readCB func([]byte)) error

func (*Client) RunWriteRead

func (c *Client) RunWriteRead(cmd string, toWrite []byte) ([]byte, error)

func (*Client) UploadBytes

func (c *Client) UploadBytes(data []byte, remote string, perm os.FileMode) error

func (*Client) UploadBytesXZ added in v0.1.2

func (c *Client) UploadBytesXZ(data []byte, remote string, perm os.FileMode) error

func (*Client) UploadFile

func (c *Client) UploadFile(local, remote string) error

Jump to

Keyboard shortcuts

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