Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ShardSize int
DOC: * ShardQueue uses the netpoll's nocopy API to merge and send data. * The Data Flush is passively triggered by ShardQueue.Add and does not require user operations. * If there is an error in the data transmission, the connection will be closed. * * ShardQueue.Add: add the data to be sent. * NewShardQueue: create a queue with netpoll.Connection. * ShardSize: the recommended number of shards is 32.
Functions ¶
This section is empty.
Types ¶
type ShardQueue ¶
type ShardQueue struct {
// contains filtered or unexported fields
}
ShardQueue uses the netpoll's nocopy API to merge and send data. The Data Flush is passively triggered by ShardQueue.Add and does not require user operations. If there is an error in the data transmission, the connection will be closed. ShardQueue.Add: add the data to be sent.
func NewShardQueue ¶
func NewShardQueue(size int, conn netpoll.Connection) (queue *ShardQueue)
NewShardQueue .
func (*ShardQueue) Close ¶ added in v0.3.2
func (q *ShardQueue) Close() error
type WriterGetter ¶
WriterGetter is used to get a netpoll.Writer.