Stratum mining proxy library skeleton with 18 Go source files, type declarations, event bus, NiceHash/simple splitter packages, pool client, HTTP API types, access/share logging, and rate limiter. No function implementations — ready for agent dispatch. Co-Authored-By: Virgil <virgil@lethean.io>
21 lines
496 B
Go
21 lines
496 B
Go
package simple
|
|
|
|
import (
|
|
"time"
|
|
|
|
"dappco.re/go/core/proxy"
|
|
"dappco.re/go/core/proxy/pool"
|
|
)
|
|
|
|
// SimpleMapper holds one outbound pool connection and serves at most one active miner
|
|
// at a time. It becomes idle when the miner disconnects and may be reclaimed for the
|
|
// next login.
|
|
//
|
|
// m := simple.NewSimpleMapper(id, strategy)
|
|
type SimpleMapper struct {
|
|
id int64
|
|
miner *proxy.Miner // nil when idle
|
|
strategy pool.Strategy
|
|
idleAt time.Time // zero when active
|
|
stopped bool
|
|
}
|