Documentation
¶
Index ¶
- Constants
- func Algos(m machine.Model) []string
- func NewSSHClient(host string) (*ssh.Client, error)
- func NewSSHClientTimeout(host string, timeout time.Duration) (*ssh.Client, error)
- type Client
- func (c *Client) GetStats() (stat MinerStats, err error)
- func (c *Client) GetStatsContext(ctx context.Context) (stat 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
- type MinerOptions
- type MinerOptionsEntry
- type MinerSetting
- type MinerStats
- type MinerStatsSystem
- type PoolSetting
- type SGDev
- type SGDevsResponse
- type SGPool
- type SGPoolsResponse
- type SGStat
- type SGStatsResponse
- type SGSummary
- type SGSummaryResponse
- type SGVersion
- type SGVersionResponse
- type SystemInfo
Constants ¶
View Source
const ( ModelGP machine.Model = "Baikal Gaiant+" ModelGX10 machine.Model = "Baikal GX10" // a.k.a. BK-X ModelG28 machine.Model = "Baikal BK-G28" ModelGB machine.Model = "Baikal Gaiant-B" // a.k.a. BK-B ModelN machine.Model = "Baikal N" // a.k.a. BK-N+ )
List of supported MinerType
Variables ¶
This section is empty.
Functions ¶
func NewSSHClient ¶
NewSSHClient returns *ssh.Client with default setting
Types ¶
type Client ¶
func (*Client) GetStats ¶
func (c *Client) GetStats() (stat MinerStats, err error)
func (*Client) GetStatsContext ¶
func (c *Client) GetStatsContext(ctx context.Context) (stat MinerStats, err error)
func (*Client) GetSystemInfo ¶
func (c *Client) GetSystemInfo() (info SystemInfo, err error)
func (*Client) GetSystemInfoContext ¶
func (c *Client) GetSystemInfoContext(ctx context.Context) (info SystemInfo, err error)
func (*Client) MinerSetting ¶
func (*Client) SetMinerSetting ¶
type MinerOptions ¶
type MinerOptions []MinerOptionsEntry
MinerOptions : /opt/scripta/etc/miner.options.json
type MinerOptionsEntry ¶
type MinerSetting ¶
MinerSetting : parsed /opt/scripta/etc/miner.options.json
func (MinerSetting) MarshalJSON ¶
func (m MinerSetting) MarshalJSON() ([]byte, error)
func (*MinerSetting) UnmarshalJSON ¶
func (m *MinerSetting) UnmarshalJSON(in []byte) error
type MinerStats ¶
type MinerStats struct { Devs []SGDev Pools []SGPool Stats []SGStat Summary SGSummary System MinerStatsSystem }
type MinerStatsSystem ¶
type MinerStatsSystem struct {
TempCPU string
}
type PoolSetting ¶
type SGDev ¶
type SGDev struct { ASC int `json:"ASC"` Name string `json:"Name"` ID int `json:"ID"` Enabled string `json:"Enabled"` Status string `json:"Status"` Temperature float64 `json:"Temperature"` MHSAv float64 `json:"MHS av"` MHS5S float64 `json:"MHS 5s"` Accepted int `json:"Accepted"` Rejected int `json:"Rejected"` HardwareErrors int `json:"Hardware Errors"` Utility float64 `json:"Utility"` TotalMH float64 `json:"Total MH"` Diff1Work float64 `json:"Diff1 Work"` DifficultyAccepted float64 `json:"Difficulty Accepted"` DifficultyRejected float64 `json:"Difficulty Rejected"` NoDevice bool `json:"No Device"` LastValidWork int `json:"Last Valid Work"` DeviceHardware float64 `json:"Device Hardware%"` DeviceRejected float64 `json:"Device Rejected%"` DeviceElapsed int `json:"Device Elapsed"` }
type SGDevsResponse ¶
type SGDevsResponse struct { minerapi.ResponseCommon Devs []SGDev `json:"DEVS"` }
type SGPool ¶
type SGPool struct { POOL int `json:"POOL"` Name string `json:"Name"` URL string `json:"URL"` Profile string `json:"Profile"` Algorithm string `json:"Algorithm"` AlgorithmType string `json:"Algorithm Type"` Description string `json:"Description"` Status string `json:"Status"` Priority int `json:"Priority"` Quota int `json:"Quota"` LongPoll string `json:"Long Poll"` Getworks int `json:"Getworks"` Accepted int `json:"Accepted"` Rejected int `json:"Rejected"` Works int `json:"Works"` Discarded int `json:"Discarded"` Stale int `json:"Stale"` GetFailures int `json:"Get Failures"` RemoteFailures int `json:"Remote Failures"` User string `json:"User"` ProxyType string `json:"Proxy Type"` Proxy string `json:"Proxy"` DifficultyAccepted float64 `json:"Difficulty Accepted"` DifficultyRejected float64 `json:"Difficulty Rejected"` DifficultyStale float64 `json:"Difficulty Stale"` HasStratum bool `json:"Has Stratum"` StratumActive bool `json:"Stratum Active"` StratumURL string `json:"Stratum URL"` HasGBT bool `json:"Has GBT"` PoolRejected float64 `json:"Pool Rejected%"` PoolStale float64 `json:"Pool Stale%"` }
type SGPoolsResponse ¶
type SGPoolsResponse struct { minerapi.ResponseCommon Pools []SGPool `json:"POOLS"` }
type SGStat ¶
type SGStat struct { STATS int `json:"STATS"` ID string `json:"ID"` Elapsed int `json:"Elapsed"` Calls int `json:"Calls"` Wait float64 `json:"Wait"` Max float64 `json:"Max"` Min float64 `json:"Min"` ChipCount int `json:"Chip Count"` Clock int `json:"Clock"` HWV json.Number `json:"HWV"` FWV json.Number `json:"FWV"` Algo string `json:"Algo"` USBPipe string `json:"USB Pipe"` USBDelay string `json:"USB Delay"` USBTmo string `json:"USB tmo"` }
type SGStatsResponse ¶
type SGStatsResponse struct { minerapi.ResponseCommon Stats []SGStat `json:"STATS"` }
type SGSummary ¶
type SGSummary struct { Elapsed int `json:"Elapsed"` MHSAv float64 `json:"MHS av"` MHS5S float64 `json:"MHS 5s"` KHSAv float64 `json:"KHS av"` KHS5S float64 `json:"KHS 5s"` FoundBlocks int `json:"Found Blocks"` Getworks int `json:"Getworks"` Accepted int `json:"Accepted"` Rejected int `json:"Rejected"` HardwareErrors int `json:"Hardware Errors"` Utility float64 `json:"Utility"` Discarded int `json:"Discarded"` Stale int `json:"Stale"` GetFailures int `json:"Get Failures"` LocalWork int `json:"Local Work"` RemoteFailures int `json:"Remote Failures"` NetworkBlocks int `json:"Network Blocks"` TotalMH float64 `json:"Total MH"` WorkUtility float64 `json:"Work Utility"` DifficultyAccepted float64 `json:"Difficulty Accepted"` DifficultyRejected float64 `json:"Difficulty Rejected"` DifficultyStale float64 `json:"Difficulty Stale"` DeviceHardware float64 `json:"Device Hardware%"` DeviceRejected float64 `json:"Device Rejected%"` PoolRejected float64 `json:"Pool Rejected%"` PoolStale float64 `json:"Pool Stale%"` LastGetwork int `json:"Last getwork"` }
type SGSummaryResponse ¶
type SGSummaryResponse struct { minerapi.ResponseCommon Summary []SGSummary `json:"SUMMARY"` }
type SGVersionResponse ¶
type SGVersionResponse struct { minerapi.ResponseCommon Version []SGVersion `json:"VERSION"` }
Click to show internal directories.
Click to hide internal directories.