Documentation
¶
Index ¶
- type BufferClient
- func (c *BufferClient) Loop()
- func (c *BufferClient) Pipeline(syncFreq int, window int32)
- func (c *BufferClient) Read(key int64) []byte
- func (c *BufferClient) RegisterReply(val state.Value, seqnum int32)
- func (c *BufferClient) Scan(key, count int64) []byte
- func (c *BufferClient) WaitReplies(waitFrom int)
- func (c *BufferClient) Write(key int64, val []byte)
- type Client
- func (c *Client) Connect() error
- func (c *Client) Disconnect()
- func (c *Client) GetReplyFrom(rid int) (*defs.ProposeReplyTS, error)
- func (c *Client) Reconnect() error
- func (c *Client) RegisterRPCTable(t *fastrpc.Table)
- func (c *Client) SendMsg(rid int32, code uint8, msg fastrpc.Serializable)
- func (c *Client) SendProposal(cmd defs.Propose)
- func (c *Client) SendRead(key int64) int32
- func (c *Client) SendScan(key, count int64) int32
- func (c *Client) SendWrite(key int64, value []byte) int32
- type ReqReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferClient ¶
type BufferClient struct { *Client Reply chan *ReqReply GetClientKey func() int64 // contains filtered or unexported fields }
func NewBufferClient ¶
func NewBufferClient(c *Client, reqNum, psize, conflict, writes int, conflictKey int64) *BufferClient
func (*BufferClient) Pipeline ¶
func (c *BufferClient) Pipeline(syncFreq int, window int32)
func (*BufferClient) Read ¶
func (c *BufferClient) Read(key int64) []byte
func (*BufferClient) RegisterReply ¶
func (c *BufferClient) RegisterReply(val state.Value, seqnum int32)
func (*BufferClient) Scan ¶
func (c *BufferClient) Scan(key, count int64) []byte
func (*BufferClient) WaitReplies ¶
func (c *BufferClient) WaitReplies(waitFrom int)
func (*BufferClient) Write ¶
func (c *BufferClient) Write(key int64, val []byte)
type Client ¶
type Client struct { *dlog.Logger ClientId int32 LeaderId int ClosestId int // also co-located Ping []float64 Fast bool Verbose bool Leaderless bool // contains filtered or unexported fields }
func NewClientLog ¶
func (*Client) Disconnect ¶
func (c *Client) Disconnect()
func (*Client) GetReplyFrom ¶
func (c *Client) GetReplyFrom(rid int) (*defs.ProposeReplyTS, error)
func (*Client) RegisterRPCTable ¶
func (*Client) SendMsg ¶
func (c *Client) SendMsg(rid int32, code uint8, msg fastrpc.Serializable)
For custom client messages
func (*Client) SendProposal ¶
Click to show internal directories.
Click to hide internal directories.