github.com/fozzysec/SiaPrime@v0.0.0-20190612043147-66c8e8d11fe3/modules/stratumminer.go (about) 1 package modules 2 3 import ( 4 "io" 5 ) 6 7 const ( 8 // StratumMinerDir is the name of the directory that is used to store the miner's 9 // persistent data. 10 StratumMinerDir = "stratumminer" 11 ) 12 13 // StratumMiner provides access to a stratum miner. 14 type StratumMiner interface { 15 // Hashrate returns the hashrate of the stratum miner in hashes per second. 16 Hashrate() float64 17 18 // Mining returns true if the stratum miner is enabled, and false otherwise. 19 Mining() bool 20 21 // Submissions returns the number of shares the miner has submitted 22 Submissions() uint64 23 24 // StartStratumMining turns on the miner, which will endlessly work for new 25 // blocks. 26 StartStratumMining(server, username string) 27 28 // StopStratumMining turns off the miner 29 StopStratumMining() 30 31 io.Closer 32 }