Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) ForceReconnect()
- func (c *Client) Start(handshakeReqs []*rpc.Request) (chan *rpc.Request, chan *rpc.Response, chan error)
- func (c *Client) URL() string
- func (c *Client) WaitForHandshake(timeout time.Duration) error
- func (c *Client) WriteRequest(req *rpc.Request) (*rpc.Response, error)
- func (c *Client) WriteRequestWithTimeout(req *rpc.Request, timeout time.Duration) (*rpc.Response, error)
- func (c *Client) WriteResponse(res *rpc.Response) error
- type Conn
- func (c *Conn) Close()
- func (c *Conn) GetAuthorized() bool
- func (c *Conn) GetClient() string
- func (c *Conn) GetClientType() int
- func (c *Conn) GetCompoundID() string
- func (c *Conn) GetDiffFactor() int
- func (c *Conn) GetErrorCount() int
- func (c *Conn) GetExtraNonce() string
- func (c *Conn) GetExtraNonceSubscribed() bool
- func (c *Conn) GetID() uint64
- func (c *Conn) GetIP() string
- func (c *Conn) GetIsSolo() bool
- func (c *Conn) GetLastDiffFactor() int
- func (c *Conn) GetLastDiffFactorAt() time.Time
- func (c *Conn) GetLastErrorAt() time.Time
- func (c *Conn) GetLatency() (time.Duration, error)
- func (c *Conn) GetMiner() string
- func (c *Conn) GetMinerID() uint64
- func (c *Conn) GetPort() int
- func (c *Conn) GetSubscribed() bool
- func (c *Conn) GetWorker() string
- func (c *Conn) GetWorkerID() uint64
- func (c *Conn) NewScanner() *bufio.Scanner
- func (c *Conn) SetAuthorized(authorized bool)
- func (c *Conn) SetClient(client string)
- func (c *Conn) SetClientType(clientType int)
- func (c *Conn) SetDiffFactor(diffFactor int)
- func (c *Conn) SetErrorCount(count int)
- func (c *Conn) SetExtraNonce(extraNonce string)
- func (c *Conn) SetExtraNonceSubscribed(extraNonceSubscribed bool)
- func (c *Conn) SetIsSolo(isSolo bool)
- func (c *Conn) SetLastErrorAt(ts time.Time)
- func (c *Conn) SetLastShareAt(ts time.Time) int
- func (c *Conn) SetMiner(miner string)
- func (c *Conn) SetMinerID(minerID uint64)
- func (c *Conn) SetReadDeadline(timestamp time.Time)
- func (c *Conn) SetSubscribed(subscribed bool)
- func (c *Conn) SetWorker(worker string)
- func (c *Conn) SetWorkerID(workerID uint64)
- func (c *Conn) SoftClose()
- func (c *Conn) Write(data []byte) error
- type Message
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoActiveConn = fmt.Errorf("no active conn") ErrResponseTimeout = fmt.Errorf("response timeout") ErrClientClosed = fmt.Errorf("client closed") ErrRequestIDInUse = fmt.Errorf("request id in use") )
View Source
var (
ErrConnNotFound = fmt.Errorf("conn not found")
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ForceReconnect ¶
func (c *Client) ForceReconnect()
func (*Client) WriteRequest ¶
func (*Client) WriteRequestWithTimeout ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) GetAuthorized ¶
func (*Conn) GetClientType ¶
func (*Conn) GetCompoundID ¶
func (*Conn) GetDiffFactor ¶
func (*Conn) GetErrorCount ¶
func (*Conn) GetExtraNonce ¶
func (*Conn) GetExtraNonceSubscribed ¶
func (*Conn) GetLastDiffFactor ¶
func (*Conn) GetLastDiffFactorAt ¶
func (*Conn) GetLastErrorAt ¶
func (*Conn) GetMinerID ¶
func (*Conn) GetSubscribed ¶
func (*Conn) GetWorkerID ¶
func (*Conn) NewScanner ¶
func (*Conn) SetAuthorized ¶
func (*Conn) SetClientType ¶
func (*Conn) SetDiffFactor ¶
func (*Conn) SetErrorCount ¶
func (*Conn) SetExtraNonce ¶
func (*Conn) SetExtraNonceSubscribed ¶
func (*Conn) SetLastErrorAt ¶
func (*Conn) SetMinerID ¶
func (*Conn) SetReadDeadline ¶
func (*Conn) SetSubscribed ¶
func (*Conn) SetWorkerID ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.