Documentation ¶
Overview ¶
Generated from https://github.com/streamrail/concurrent-map
Index ¶
- Constants
- Variables
- type BlockTemplate
- type Endpoint
- type ErrorReply
- type GetJobParams
- type JSONPushMessage
- type JSONRpcReq
- type JSONRpcResp
- type Job
- type JobReply
- type JobReplyData
- type LoginParams
- type Miner
- type MinersMap
- func (m MinersMap) Count() int
- func (m MinersMap) Get(key string) (*Miner, bool)
- func (m MinersMap) GetShard(key string) *MinersMapShared
- func (m *MinersMap) Has(key string) bool
- func (m *MinersMap) IsEmpty() bool
- func (m MinersMap) Iter() <-chan Tuple
- func (m MinersMap) IterBuffered() <-chan Tuple
- func (m *MinersMap) Remove(key string)
- func (m *MinersMap) Set(key string, value *Miner)
- type MinersMapShared
- type Session
- type StatusReply
- type StratumServer
- type SubmitParams
- type Tuple
Constants ¶
View Source
const (
MaxReqSize = 10 * 1024
)
Variables ¶
View Source
var SHARD_COUNT = 32
Functions ¶
This section is empty.
Types ¶
type BlockTemplate ¶
type BlockTemplate struct {
// contains filtered or unexported fields
}
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
func NewEndpoint ¶
func (*Endpoint) Listen ¶
func (e *Endpoint) Listen(s *StratumServer)
type ErrorReply ¶
type GetJobParams ¶
type GetJobParams struct {
Id string `json:"id"`
}
type JSONPushMessage ¶
type JSONRpcReq ¶
type JSONRpcReq struct { Id *json.RawMessage `json:"id"` Method string `json:"method"` Params *json.RawMessage `json:"params"` }
type JSONRpcResp ¶
type JSONRpcResp struct { Id *json.RawMessage `json:"id"` Version string `json:"jsonrpc"` Result interface{} `json:"result"` Error interface{} `json:"error"` }
type JobReply ¶
type JobReply struct { Id string `json:"id"` Job *JobReplyData `json:"job"` Status string `json:"status"` }
type JobReplyData ¶
type LoginParams ¶
type MinersMap ¶
type MinersMap []*MinersMapShared
A "thread" safe map of type string:*Miner. To avoid lock bottlenecks this map is dived to several (SHARD_COUNT) map shards.
func (MinersMap) GetShard ¶
func (m MinersMap) GetShard(key string) *MinersMapShared
Returns shard under given key
func (MinersMap) IterBuffered ¶
Returns a buffered iterator which could be used in a for range loop.
type MinersMapShared ¶
type MinersMapShared struct { // contains filtered or unexported fields }
type StatusReply ¶
type StatusReply struct {
Status string `json:"status"`
}
type StratumServer ¶
type StratumServer struct {
// contains filtered or unexported fields
}
func NewStratum ¶
func NewStratum(cfg *pool.Config) *StratumServer
func (*StratumServer) Listen ¶
func (s *StratumServer) Listen()
func (*StratumServer) StatsIndex ¶
func (s *StratumServer) StatsIndex(w http.ResponseWriter, r *http.Request)
type SubmitParams ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.