Documentation ¶
Index ¶
- Constants
- type AuthorizeREQ
- type AuthorizeResult
- type ErrType
- type JSONRpcNotifyRESP
- type JSONRpcREQ
- type JSONRpcRESP
- func NewAuthorizeRESP(id *json.RawMessage, result AuthorizeResult) *JSONRpcRESP
- func NewErrJobNotFoundRESP(id *json.RawMessage) *JSONRpcRESP
- func NewErrNotSubscribedRESP(id *json.RawMessage) *JSONRpcRESP
- func NewErrOtherUnknownRESP(id *json.RawMessage) *JSONRpcRESP
- func NewErrResp(id *json.RawMessage, errType ErrType) *JSONRpcRESP
- func NewErrUnauthorizedWorkerRESP(id *json.RawMessage) *JSONRpcRESP
- func NewSubmitRESP(id *json.RawMessage, result SubmitResult) *JSONRpcRESP
- func NewSubscribeRESP(id *json.RawMessage, notify interface{}, difficulty interface{}, ...) *JSONRpcRESP
- type JSONRpcSetDifficultyRESP
- type JobDifficultyCheck
- type JobHeightCheck
- type JobNotify
- type Loader
- type SubmitREQ
- type SubmitResult
- type SubscribeREQ
Constants ¶
View Source
const ( MsgFullNameJsonRpcREQ = "proto.JSONRpcREQ" MsgFullNameJsonRpcResp = "proto.JSONRpcRESP" MsgFullNameJSONRpcSetDifficultyRESP = "proto.JSONRpcSetDifficultyRESP" MsgFullNameJSONRpcNotifyRESP = "proto.JSONRpcNotifyRESP" MsgFullNameJobNotify = "proto.jobNotify" MsgFullNameJobDifficultyCheck = "proto.jobDifficultyCheck" MsgFullNameJobHashCheck = "proto.jobHashCheck" MiningRecvMethodSubscribe = "mining.subscribe" MiningRecvMethodExtranonceSubscribe = "mining.extranonce.subscribe" MiningRecvMethodAuthorize = "mining.authorize" MiningRecvMethodSubmit = "mining.submit" MiningRespMethodSetDifficulty = "mining.set_difficulty" MiningRespMethodNotify = "mining.notify" ConnAcceptd = "conn.accepted" ConnClosed = "conn.closed" ConnUnknown = "conn.unknown" JobMethodNotify = "job.notify" JobMethodDifficultyCheck = "job.difficulty.check" JobMethodHeightCheck = "job.height.check" AuthorizePass AuthorizeResult = true AuthorizeRefuse AuthorizeResult = false SubmitPass SubmitResult = true SubmitRefuse SubmitResult = false )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizeREQ ¶
type AuthorizeREQ struct { Id *json.RawMessage WorkerName string Password string }
func NewAuthorizeREQ ¶
func NewAuthorizeREQ() *AuthorizeREQ
func (*AuthorizeREQ) Load ¶
func (o *AuthorizeREQ) Load(j *JSONRpcREQ)
func (*AuthorizeREQ) String ¶
func (o *AuthorizeREQ) String() string
type AuthorizeResult ¶
type AuthorizeResult bool
type JSONRpcNotifyRESP ¶
type JSONRpcNotifyRESP struct { Id interface{} `json:"id"` Method string `json:"method"` Params []interface{} `json:"params"` }
func NewJSONRpcNotifyRESP ¶
func NewJSONRpcNotifyRESP(params []interface{}) *JSONRpcNotifyRESP
func (*JSONRpcNotifyRESP) String ¶
func (o *JSONRpcNotifyRESP) String() string
type JSONRpcREQ ¶
type JSONRpcREQ struct { Id *json.RawMessage `json:"id"` Method string `json:"method"` Params []interface{} `json:"params"` }
func (*JSONRpcREQ) String ¶
func (o *JSONRpcREQ) String() string
type JSONRpcRESP ¶
type JSONRpcRESP struct { Id *json.RawMessage `json:"id"` Result interface{} `json:"result"` Error []interface{} `json:"error"` }
func NewAuthorizeRESP ¶
func NewAuthorizeRESP(id *json.RawMessage, result AuthorizeResult) *JSONRpcRESP
func NewErrJobNotFoundRESP ¶
func NewErrJobNotFoundRESP(id *json.RawMessage) *JSONRpcRESP
func NewErrNotSubscribedRESP ¶
func NewErrNotSubscribedRESP(id *json.RawMessage) *JSONRpcRESP
func NewErrOtherUnknownRESP ¶
func NewErrOtherUnknownRESP(id *json.RawMessage) *JSONRpcRESP
func NewErrResp ¶
func NewErrResp(id *json.RawMessage, errType ErrType) *JSONRpcRESP
func NewErrUnauthorizedWorkerRESP ¶
func NewErrUnauthorizedWorkerRESP(id *json.RawMessage) *JSONRpcRESP
func NewSubmitRESP ¶
func NewSubmitRESP(id *json.RawMessage, result SubmitResult) *JSONRpcRESP
func NewSubscribeRESP ¶
func NewSubscribeRESP(id *json.RawMessage, notify interface{}, difficulty interface{}, extraNonce1 string, extraNonce2Length int) *JSONRpcRESP
func (*JSONRpcRESP) String ¶
func (o *JSONRpcRESP) String() string
type JSONRpcSetDifficultyRESP ¶
type JSONRpcSetDifficultyRESP struct { Method string `json:"method"` Params []uint64 `json:"params"` }
func NewJSONRpcSetDifficultyRESP ¶
func NewJSONRpcSetDifficultyRESP(difficulty uint64) *JSONRpcSetDifficultyRESP
func (*JSONRpcSetDifficultyRESP) String ¶
func (o *JSONRpcSetDifficultyRESP) String() string
type JobDifficultyCheck ¶
type JobDifficultyCheck struct { }
func (*JobDifficultyCheck) String ¶
func (o *JobDifficultyCheck) String() string
type JobHeightCheck ¶
type JobHeightCheck struct { }
func (*JobHeightCheck) String ¶
func (o *JobHeightCheck) String() string
type Loader ¶
type Loader interface {
Load(j *JSONRpcREQ)
}
type SubmitREQ ¶
type SubmitREQ struct { Id *json.RawMessage WorkerName string JobId string ExtraNonce2 string NTime string Nonce string }
func NewSubmitREQ ¶
func NewSubmitREQ() *SubmitREQ
func (*SubmitREQ) Load ¶
func (o *SubmitREQ) Load(j *JSONRpcREQ)
type SubmitResult ¶
type SubmitResult bool
type SubscribeREQ ¶
type SubscribeREQ struct { Id *json.RawMessage UserAgent string Session string }
func NewSubscribeREQ ¶
func NewSubscribeREQ() *SubscribeREQ
func (*SubscribeREQ) Load ¶
func (o *SubscribeREQ) Load(j *JSONRpcREQ)
func (*SubscribeREQ) String ¶
func (o *SubscribeREQ) String() string
Click to show internal directories.
Click to hide internal directories.