Documentation
¶
Index ¶
- type Devs
- type Pool
- type SGMiner
- func (miner *SGMiner) AddPool(url, username, password string) error
- func (miner *SGMiner) Delete(pool *Pool) error
- func (miner *SGMiner) Devs() (*[]Devs, error)
- func (miner *SGMiner) Disable(pool *Pool) error
- func (miner *SGMiner) Enable(pool *Pool) error
- func (miner *SGMiner) Pools() ([]Pool, error)
- func (miner *SGMiner) Quit() error
- func (miner *SGMiner) Restart() error
- func (miner *SGMiner) Run(command, argument string) (string, error)
- func (miner *SGMiner) Summary() (*Summary, error)
- func (miner *SGMiner) SwitchPool(pool *Pool) error
- type Summary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Devs ¶
type Devs struct {
GPU int64
Enabled string
Status string
GPULoad int64 `json:"GPU Load"`
Temperature float64
FanSpeed int `json:"Fan Speed"`
FanPercent int64 `json:"Fan Percent"`
GPUClock int64 `json:"GPU Clock"`
MemoryClock int64 `json:"Memory Clock"`
GPUVoltage float64 `json:"GPU Voltage"`
Powertune int64
MHSav float64 `json:"MHS av"`
MHS5s float64 `json:"MHS 5s"`
Accepted int64
Rejected int64
HardwareErrors int64 `json:"Hardware Errors"`
Utility float64
Intensity string
TotalMH float64 `json:"TotalMH"`
Diff1Work float64 `json:"Diff1 Work"`
DifficultyAccepted float64 `json:"Difficulty Accepted"`
DifficultyRejected float64 `json:"Difficulty Rejected"`
LastValidWork int64 `json:"Last Valid Work"`
DeviceHardware float64 `json:"Device Hardware%"`
DeviceRejected float64 `json:"Device Rejected%"`
DeviceElapsed int64 `json:"Device Elapsed"`
}
type Pool ¶
type Pool struct {
Algorithm string
Accepted int64
DifficultyAccepted float64 `json:"Difficulty Accepted"`
DifficultyRejected float64 `json:"Difficulty Rejected"`
DifficultyStale float64 `json:"Difficulty Stale"`
Discarded int64
GetFailures int64 `json:"Get Failures"`
Getworks int64
HasGBT bool `json:"Has GBT"`
HasStratum bool `json:"Has Stratum"`
LongPoll string `json:"Long Poll"`
Name string
Pool int64 `json:"POOL"`
PoolRejectedPercentage float64 `json:"Pool Rejected%"`
PoolStalePercentage float64 `json:"Pool Stale%"`
Priority int64
ProxyType string `json:"Proxy Type"`
Proxy string
Quota int64
Rejected int64
RemoteFailures int64 `json:"Remote Failures"`
Stale int64
Status string
StratumActive bool `json:"Stratum Active"`
StratumURL string `json:"Stratum URL"`
URL string
User string
Works int64
}
type SGMiner ¶
type SGMiner struct {
// contains filtered or unexported fields
}
func New ¶
New returns a SGMiner pointer, which is used to communicate with a running SGMiner instance. Note that New does not attempt to connect to the miner.
func (*SGMiner) AddPool ¶
AddPool adds the given URL/username/password combination to the miner's pool list.
func (*SGMiner) SwitchPool ¶
type Summary ¶
type Summary struct {
Accepted int64
DeviceHardwarePercent float64 `json:"Device Hardware%"`
DeviceRejectedPercent float64 `json:"Device Rejected%"`
DifficultyAccepted float64 `json:"Difficulty Accepted"`
DifficultyRejected float64 `json:"Difficulty Rejected"`
DifficultyStale float64 `json:"Difficulty Stale"`
Discarded int64
Elapsed int64
FoundBlocks int64 `json:"Found Blocks"`
GetFailures int64 `json:"Get Failures"`
Getworks int64
HardwareErrors int64 `json:"Hardware Errors"`
LocalWork int64 `json:"Local Work"`
MHS5s float64 `json:"MHS 5s"`
MHSav float64 `json:"MHS av"`
NetworkBlocks int64 `json:"Network Blocks"`
PoolRejectedPercentage float64 `json:"Pool Rejected%"`
PoolStalePercentage float64 `json:"Pool Stale%"`
Rejected int64
RemoteFailures int64 `json:"Remote Failures"`
Stale int64
TotalMH float64 `json:"Total MH"`
Utilty float64
WorkUtility float64 `json:"Work Utility"`
}