Documentation ¶
Index ¶
- Constants
- Variables
- func BaseDir() string
- func InitMinerNode(auth, port string)
- func QueryMinerData(subAddr account.ID) (*eth.MinerData, error)
- func WalletDir(base string) string
- type Bucket
- type BucketManager
- type BucketMap
- type Conf
- type MicChain
- type MinerWallet
- type Node
- type PathConf
- type PingTest
- type ProbeReq
- type SetupData
- type SetupReq
Constants ¶
View Source
const ( InitBucketSize = 1 << 24 //16M RechargePieceSize = 1 << 22 //4M MaxLostRechargeReq = 2 ConnectionBufSize = 1 << 20 )
View Source
const ( DefaultBaseDir = ".hop" WalletFile = "wallet.json" DataBase = "Receipts" LogFile = "log.hop" PidFile = "pid.hop" ConfFile = "conf.hop" )
View Source
const BUFFER_SIZE = 1 << 20
Variables ¶
View Source
var CMDServicePort = "42017"
View Source
var (
DBKeyMinerData = "%s_DB_KEY_MINER_DATA_FOR_POOL_%s_%s"
)
View Source
var (
ErrNoPacketBalance = fmt.Errorf("need to recharge for this mienr")
)
View Source
var PathSetting = &PathConf{}
View Source
var SysConf = &Conf{}
Functions ¶
func InitMinerNode ¶
func InitMinerNode(auth, port string)
Types ¶
type Bucket ¶
func (*Bucket) WriteCount ¶
type BucketManager ¶
type BucketManager interface {
RechargeBucket(*microchain.Receipt) error
}
type BucketMap ¶
func (*BucketMap) BucketTimer ¶
func (bm *BucketMap) BucketTimer(sig chan struct{})
type Conf ¶
type Conf struct { BAS string *com.EthereumConfig }
type MicChain ¶
type MicChain struct { Sign *microchain.ReceiptSync BucketManager BucketManager // contains filtered or unexported fields }
type MinerWallet ¶
func WInst ¶
func WInst() *MinerWallet
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) RechargeBucket ¶
func (n *Node) RechargeBucket(r *microchain.Receipt) error
func (*Node) ShowUserBucket ¶
func (*Node) TestService ¶
func (n *Node) TestService(sig chan struct{})
type PathConf ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.