Documentation ¶
Index ¶
- Constants
- Variables
- type AdjustResult
- type Auth
- type Error
- type MineTask
- type NonceMeter
- type NonceResult
- type Notify
- type Request
- type Response
- type Server
- type Session
- func (this *Session) AdjustDifficulty(serverDifficulty uint64) bool
- func (this *Session) Close()
- func (this *Session) GetDifficulty() uint64
- func (this *Session) GetHashRate() uint64
- func (this *Session) GetLastSubmitTime() int64
- func (this *Session) GetSessionId() string
- func (this *Session) NonceMeter(nonceDifficulty uint64)
- func (this *Session) RegisterAuthorizeFunc(onAuthorize func(sessionId string))
- func (this *Session) RegisterCloseFunc(onClose func(sessionId string))
- func (this *Session) RegisterSubmitFunc(onSubmit func(nonce uint64))
- func (this *Session) Start(calcHashRate bool)
- type SimpleAuth
- type StratumTask
- type SubscribeResult
Constants ¶
View Source
const (
UINT64MAX uint64 = 0xFFFFFFFFFFFFFFFF
)
Variables ¶
View Source
var ( ResultChanSize = 100 InitDifficulty int64 = 2000000 )
View Source
var ( PeriodMax = float64(5) // s PeriodMin = float64(1.5) HashRateLen = 90 MinDifficulty uint64 = 120000 )
Functions ¶
This section is empty.
Types ¶
type AdjustResult ¶ added in v1.0.6
type AdjustResult struct {
// contains filtered or unexported fields
}
type NonceMeter ¶ added in v1.0.6
type NonceMeter struct {
// contains filtered or unexported fields
}
type NonceResult ¶ added in v1.0.6
type Notify ¶
type Notify struct { Params []interface{} `json:"params"` Id interface{} `json:"id"` Method string `json:"method"` }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) GetCurrentMineTask ¶ added in v1.0.6
func (this *Server) GetCurrentMineTask() *StratumTask
func (*Server) GetHashRate ¶
func (*Server) ReadResult ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) AdjustDifficulty ¶ added in v1.0.6
func (*Session) GetDifficulty ¶ added in v1.0.6
get session difficulty
func (*Session) GetHashRate ¶
func (*Session) GetLastSubmitTime ¶ added in v1.0.6
func (*Session) GetSessionId ¶
func (*Session) NonceMeter ¶ added in v1.0.6
func (*Session) RegisterAuthorizeFunc ¶
func (*Session) RegisterCloseFunc ¶
func (*Session) RegisterSubmitFunc ¶
type SimpleAuth ¶
type SimpleAuth struct {
// contains filtered or unexported fields
}
func NewSimpleAuth ¶
func NewSimpleAuth(passwd string) *SimpleAuth
type StratumTask ¶
type SubscribeResult ¶
Click to show internal directories.
Click to hide internal directories.