Documentation ¶
Index ¶
- Variables
- func Register(name string, factory MinerFactory)
- type Algorithm
- type Device
- type DeviceProvider
- type DeviceQuery
- type DeviceSelectBy
- type Downloadable
- type Executor
- type Manager
- type Miner
- type MinerFactory
- type MiningConfig
- type Option
- type OptionFunc
- type PathExecutor
- type Pool
- type Settings
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMinerAlreadyStarted = errors.New("miner already started") ErrMinerAlreadyStopped = errors.New("miner already stopped") )
Functions ¶
func Register ¶
func Register(name string, factory MinerFactory)
Types ¶
type Algorithm ¶
type Algorithm string
const ( Undefined Algorithm = "" Ethash Algorithm = "ethash" // eth Etchash Algorithm = "etchash" // etc Kawpow Algorithm = "kawpow" // raven Autolykos2 Algorithm = "autolykos2" // ergo Verthash Algorithm = "verthash" // ctx Nimiq Algorithm = "nimiw" // (nimiq) Lyra2z Algorithm = "lyra2z" Phi2 Algorithm = "phi2" // (lux, argoneum) Lyra2rev3 Algorithm = "lyra2rev3" X16r Algorithm = "x16r" X16rv2 Algorithm = "x16rv2" X16s Algorithm = "x16s" // (pgn, xsh) X16rt Algorithm = "x16rt" // (gin) Mtp Algorithm = "mtp" // (zcoin) Cuckatoo31Grin Algorithm = "cuckatoo31_grin" // (grin) Cuckarood29Grin Algorithm = "cuckarood29_grin" // (grin) Cnv8 Algorithm = "cnv8" Cnr Algorithm = "cnr" // (old monero) Cnv8Half Algorithm = "cnv8_half" // (stellite, masari) Cnv8Dbl Algorithm = "cnv8_dbl" // (x-cash) Cnv8Rwz Algorithm = "cnv8_rwz" // (graft) Cnv8Trtl Algorithm = "cnv8_trtl" // (old turtlecoin, loki) Cnv8Upx2 Algorithm = "cnv8_upx2" // (uplexa) CnHeavy Algorithm = "cn_heavy" // (classic CN heavy) CnHaven Algorithm = "cn_haven" // (haven) CnSaber Algorithm = "cn_saber" // (bittube) CnConceal Algorithm = "cn_conceal" // (conceal) TrtlChukwa Algorithm = "trtl_chukwa" // (turtlecoin) TrtlChukwa2 Algorithm = "trtl_chukwa2" // (turtlecoin) )
type DeviceProvider ¶
type DeviceProvider interface {
Select(query *DeviceQuery, target interface{}) (Device, error)
}
type DeviceQuery ¶
type DeviceQuery struct { ByIndex int ByName string ByBus string By DeviceSelectBy }
func ParseDeviceQuery ¶
func ParseDeviceQuery(queryStr string) (*DeviceQuery, error)
func (*DeviceQuery) String ¶
func (q *DeviceQuery) String() string
type DeviceSelectBy ¶
type DeviceSelectBy string
const ( ByIndex DeviceSelectBy = "index" ByName DeviceSelectBy = "name" ByBus DeviceSelectBy = "bus" )
func (DeviceSelectBy) Valid ¶
func (b DeviceSelectBy) Valid() bool
type Downloadable ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
type MinerFactory ¶
type MiningConfig ¶
type Option ¶
type Option interface {
Configure(o *Settings)
}
func WithDevice ¶
func WithDevice(device *DeviceQuery) Option
func WithDeviceByBus ¶
func WithDeviceByIndex ¶
func WithDeviceByName ¶
func WithExecutor ¶
type OptionFunc ¶
type OptionFunc func(o *Settings)
func (OptionFunc) Configure ¶
func (f OptionFunc) Configure(o *Settings)
type PathExecutor ¶
type PathExecutor struct {
// contains filtered or unexported fields
}
func NewPathExecutor ¶
func NewPathExecutor(basePath string) *PathExecutor
type Settings ¶
type Settings struct { Executor Executor Device *DeviceQuery Pool Pool }
Click to show internal directories.
Click to hide internal directories.