Documentation ¶
Index ¶
- Constants
- func Algos(m machine.Model) []string
- func MinerTypeFromString(s string) (machine.Model, error)
- func NewSSHClient(host string) (*ssh.Client, error)
- func NewSSHClientTimeout(host string, timeout time.Duration) (*ssh.Client, error)
- type Client
- func (c *Client) GetMinerSetting() (setting MinerSetting, err error)
- func (c *Client) GetMinerSettingContext(ctx context.Context) (setting MinerSetting, err error)
- func (c *Client) GetStats() (stats MinerStats, err error)
- func (c *Client) GetStatsContext(ctx context.Context) (stats MinerStats, err error)
- func (c *Client) GetSystemInfo() (info SystemInfo, err error)
- func (c *Client) GetSystemInfoContext(ctx context.Context) (info SystemInfo, err error)
- func (c *Client) MineStart(ctx context.Context) error
- func (c *Client) MineStop(ctx context.Context) error
- func (c *Client) MinerSetting(ctx context.Context) (machine.MinerSetting, error)
- func (c *Client) Reboot(ctx context.Context) error
- func (c *Client) Restart(ctx context.Context) error
- func (c *Client) RigInfo(ctx context.Context) (machine.RigInfo, error)
- func (c *Client) RigStat(ctx context.Context) (machine.RigStat, error)
- func (c *Client) SSHConfig(host string) (string, *ssh.ClientConfig)
- func (c *Client) SetMinerSetting(ctx context.Context, setting machine.MinerSetting) error
- func (c *Client) Setup(ctx context.Context) error
- func (c *Client) WriteCGMinerSetting(setting MinerSetting) error
- func (c *Client) WriteCGMinerSettingContext(ctx context.Context, setting MinerSetting) error
- type MinerSetting
- type MinerStats
- type MinerStatsChain
- type MinerStatsDevs
- type MinerStatsPool
- type MinerStatsSummary
- type PoolSetting
- type SystemInfo
Constants ¶
View Source
const ( ModelL3P machine.Model = "Antminer L3+" ModelX3 machine.Model = "Antminer X3" ModelB3 machine.Model = "Antminer B3" ModelZ9Mini machine.Model = "Antminer Z9-Mini" ModelZ9 machine.Model = "Antminer Z9" ModelE3 machine.Model = "Antminer E3" )
List of supported MinerType
Variables ¶
This section is empty.
Functions ¶
func MinerTypeFromString ¶
MinerTypeFromString returns MinerType
func NewSSHClient ¶
NewSSHClient returns *ssh.Client with default setting
Types ¶
type Client ¶
func (*Client) GetMinerSetting ¶
func (c *Client) GetMinerSetting() (setting MinerSetting, err error)
GetMinerSetting returns MinerSetting or create with default setting
func (*Client) GetMinerSettingContext ¶
func (c *Client) GetMinerSettingContext(ctx context.Context) (setting MinerSetting, err error)
GetMinerSettingContext returns MinerSetting or create with default setting
func (*Client) GetStats ¶
func (c *Client) GetStats() (stats MinerStats, err error)
GetStats returns MinerStats
func (*Client) GetStatsContext ¶
func (c *Client) GetStatsContext(ctx context.Context) (stats MinerStats, err error)
GetStatsContext returns MinerStats
func (*Client) GetSystemInfo ¶
func (c *Client) GetSystemInfo() (info SystemInfo, err error)
GetSystemInfo returns SystemInfo
func (*Client) GetSystemInfoContext ¶
func (c *Client) GetSystemInfoContext(ctx context.Context) (info SystemInfo, err error)
GetSystemInfoContext returns SystemInfo
func (*Client) MinerSetting ¶
func (*Client) SetMinerSetting ¶
func (*Client) WriteCGMinerSetting ¶
func (c *Client) WriteCGMinerSetting(setting MinerSetting) error
func (*Client) WriteCGMinerSettingContext ¶
func (c *Client) WriteCGMinerSettingContext(ctx context.Context, setting MinerSetting) error
type MinerSetting ¶
type MinerSetting struct { Options map[string]string Pools []PoolSetting `json:"pools"` }
MinerSetting : /config/cgminer.conf
func (MinerSetting) CommonMinerSetting ¶
func (m MinerSetting) CommonMinerSetting() machine.MinerSetting
func (*MinerSetting) LoadCommonMinerSetting ¶
func (m *MinerSetting) LoadCommonMinerSetting(s machine.MinerSetting) error
type MinerStats ¶
type MinerStats struct { Summary MinerStatsSummary Pools []MinerStatsPool Devs MinerStatsDevs }
MinerStats : miner status
type MinerStatsChain ¶
type MinerStatsChain struct { Index string Acn string Freq string Rate string Hw string TempPCB string TempChip string Status string }
MinerStatsChain : miner status per chain
type MinerStatsDevs ¶
type MinerStatsDevs struct { Fans []string Chains []MinerStatsChain }
MinerStatsDevs : miner status
type MinerStatsPool ¶
type MinerStatsPool struct { Index string URL string User string Status string StratumActive string Priority string Getworks string Accepted string Rejected string Discarded string Stale string Diff string DifficultyAccepted string DifficultyRejected string DifficultyStale string }
MinerStatsPool : pool status
type MinerStatsSummary ¶
type MinerStatsSummary struct { Elapsed string GHS5s string GHSAvarage string Foundblocks string Getworks string Accepted string Rejected string HardwareErrors string Utility string Discarded string Stale string Localwork string WorkUtility string DifficultyAccepted string DifficultyRejected string DifficultyStale string }
MinerStatsSummary : summary
type PoolSetting ¶
type PoolSetting struct { URL string `json:"url"` User string `json:"user"` Pass string `json:"pass"` }
PoolSetting : A part of /config/cgminer.conf
Click to show internal directories.
Click to hide internal directories.