base

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCPUTemp

func GetCPUTemp(ctx context.Context, client *ssh.Client) (string, error)

func GetFileSystemVersion

func GetFileSystemVersion(ctx context.Context, client *ssh.Client) (string, error)

func GetHostname

func GetHostname(ctx context.Context, client *ssh.Client) (string, error)

func GetIPAddr

func GetIPAddr(ctx context.Context, client *ssh.Client) (string, error)

func GetKernelVersion

func GetKernelVersion(ctx context.Context, client *ssh.Client) (string, error)

func GetMacAddr

func GetMacAddr(ctx context.Context, client *ssh.Client) (string, error)

func GetUptimeSeconds

func GetUptimeSeconds(ctx context.Context, client *ssh.Client) (string, error)

func OutputMinerRPC

func OutputMinerRPC(ctx context.Context, d Dialer, command, argument string) ([]byte, error)

func OutputRemoteShell

func OutputRemoteShell(ctx context.Context, client *ssh.Client, in string) ([]byte, error)

func RunRemoteShell

func RunRemoteShell(ctx context.Context, client *ssh.Client, in string) error

Types

type Client

type Client struct {
	SSH *ssh.Client
	MU  sync.RWMutex
}

func (*Client) Close

func (c *Client) Close() error

func (*Client) SetSSH

func (c *Client) SetSSH(client *ssh.Client)

func (*Client) Setup

func (c *Client) Setup(ctx context.Context) error

type Dialer

type Dialer interface {
	Dial(n, addr string) (net.Conn, error)
}

Jump to

Keyboard shortcuts

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