asic

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverByIPScan

func DiscoverByIPScan(ctx context.Context, networks []string, portBegin int, portEnd int) ([]machine.RemoteRig, error)

DiscoverByIPScan : find ASICs by scan network

func DiscoverByMCast

func DiscoverByMCast(ctx context.Context, mcastCode string, mcastAddr string, mcastListenPort int, timeout time.Duration, handler func(machine.RemoteRig)) error

DiscoverByMCast find ASICs by broadcast message

Types

type Client

Client interface

func Dial

func Dial(r machine.RemoteRig) (Client, error)

Dial : get asic client from RemoteRig

func DialTimeout

func DialTimeout(r machine.RemoteRig, timeout time.Duration) (Client, error)

DialTimeout : get asic client from RemoteRig with connection timeout

type Connector

type Connector interface {
	SSHConfig(host string) (string, *ssh.ClientConfig)
	SetSSH(ssh *ssh.Client)
	Close() error
}

Connector handles *ssh.Client

type Controller

type Controller interface {
	MineStop(context.Context) error
	MineStart(context.Context) error
	Restart(context.Context) error
	Reboot(context.Context) error
}

Controller controlls ASIC

type InfoReader

type InfoReader interface {
	RigInfo(context.Context) (machine.RigInfo, error)
}

InfoReader : ASIC basic info

type SettingReader

type SettingReader interface {
	MinerSetting(context.Context) (machine.MinerSetting, error)
}

SettingReader : get setting

type SettingWriter

type SettingWriter interface {
	SetMinerSetting(context.Context, machine.MinerSetting) error
}

SettingWriter updates setting

type StatReader

type StatReader interface {
	RigStat(context.Context) (machine.RigStat, error)
}

StatReader : ASIC status

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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