Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Connect(ctx context.Context, addr, serverKey string) error
- func (c *Client) DefaultReconnect(waitBeforeReconnect time.Duration, maxTries int) OnDisconnectCallback
- func (c *Client) Do(ctx context.Context, typeID int32, payload []byte) (*LiteResponse, error)
- func (c *Client) SetOnDisconnect(cb OnDisconnectCallback)
- type LiteRequest
- type LiteResponse
- type OnDisconnectCallback
Constants ¶
View Source
const ADNLQuery int32 = -1265895046
View Source
const ADNLQueryResponse int32 = 262964246
View Source
const LiteServerQuery int32 = 2039219935
View Source
const TCPPing int32 = 1292381082
View Source
const TCPPong int32 = -597034237
Variables ¶
View Source
var ErrNoActiveConnections = errors.New("no active connections")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DefaultReconnect ¶ added in v0.2.0
func (c *Client) DefaultReconnect(waitBeforeReconnect time.Duration, maxTries int) OnDisconnectCallback
func (*Client) SetOnDisconnect ¶ added in v0.2.0
func (c *Client) SetOnDisconnect(cb OnDisconnectCallback)
type LiteRequest ¶
type LiteRequest struct { TypeID int32 QueryID []byte Data []byte RespChan chan *LiteResponse }
type LiteResponse ¶
type OnDisconnectCallback ¶ added in v0.2.0
type OnDisconnectCallback func(addr, key string)
Click to show internal directories.
Click to hide internal directories.