Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FNV1av32 ¶
FNV1av32 哈希函数. 参考 http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-source
Types ¶
type Batcher ¶
type Batcher struct {
// contains filtered or unexported fields
}
Batcher 匹处理器, 用于批量处理指定的事务
type BatcherGroup ¶
type BatcherGroup []*Batcher
BatcherGroup 一组匹处理器
func NewBatcherGroup ¶
func NewBatcherGroup(cfg *BatcherGroupCfg) BatcherGroup
NewBatcherGroup 返回BatcherGroup实例.
func (BatcherGroup) Put ¶
func (bg BatcherGroup) Put(key string, job interface{}) error
Put 将待处理的事务加入批处理器组, 并按照关键词分发给指定的批处理器处理.
type BatcherGroupCfg ¶
type BatcherGroupCfg struct { BatcherNum int BatcherConcurrency int MaxBatchSize int FlushTimeMs int SourceQueueSize int }
BatcherGroupCfg 匹处理器组配置
type SourceItem ¶
type SourceItem struct {
// contains filtered or unexported fields
}
SourceItem 待处理的事务单元
Click to show internal directories.
Click to hide internal directories.