Documentation ¶
Index ¶
- Constants
- func Check(err error) bool
- func Debug(a ...interface{})
- func Debugc(fn func() string)
- func Debugf(format string, a ...interface{})
- func Debugs(a interface{})
- func Error(a ...interface{})
- func Errorc(fn func() string)
- func Errorf(format string, a ...interface{})
- func Errors(a interface{})
- func Fatal(a ...interface{})
- func Fatalc(fn func() string)
- func Fatalf(format string, a ...interface{})
- func Fatals(a interface{})
- func Info(a ...interface{})
- func Infoc(fn func() string)
- func Infof(format string, a ...interface{})
- func Infos(a interface{})
- func Trace(a ...interface{})
- func Tracec(fn func() string)
- func Tracef(format string, a ...interface{})
- func Traces(a interface{})
- func Warn(a ...interface{})
- func Warnc(fn func() string)
- func Warnf(format string, a ...interface{})
- func Warns(a interface{})
- type Counter
- type Worker
Constants ¶
const RoundsPerAlgo = 69
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Counter ¶
type Counter struct { C atomic.Int32 Algos atomic.Value // []int32 RoundsPerAlgo atomic.Int32 // contains filtered or unexported fields }
func NewCounter ¶
NewCounter returns an initialized algorithm rolling counter that ensures each miner does equal amounts of every algorithm
func (*Counter) GetAlgoVer ¶
GetAlgoVer returns the next algo version based on the current configuration
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func New ¶
New initialises the state for a worker, loading the work function handler that runs a round of processing between checking quit signal and work semaphore
func NewWithConnAndSemaphore ¶
NewWithConnAndSemaphore is exposed to enable use an actual network connection while retaining the same RPC API to allow a worker to be configured to run on a bare metal system with a different launcher main
func (*Worker) NewJob ¶
NewJob is a delivery of a new job for the worker, this makes the miner start mining from pause or pause, prepare the work and restart
func (*Worker) Pause ¶
Pause signals the worker to stop working, releases its semaphore and the worker is then idle