Versions in this module Expand all Collapse all v2 v2.3.3 Oct 19, 2023 Changes in this version + const Filepath + var ErrAddsTimeout = errors.New("add multiple key timeout") + var ErrCannotModifyTheNestConfiguration = errors.New(...) + func ChecksumKeyModulo(key bn.Key, length int) int + type KeyModuloAlgorithm func(key bn.Key, length int) int + type ModuloShardingAlgorithm struct + Length int + func NewModuloSA(l int) *ModuloShardingAlgorithm + func (a ModuloShardingAlgorithm) DoSharding(shardingValues []bn.Key) [][]bn.Key + func (a ModuloShardingAlgorithm) DoShardingOnce(key bn.Key) (index int) + type ShardingAlgorithm interface + DoSharding func(shardingValues []bn.Key) [][]bn.Key + DoShardingOnce func(bn.Key) (index int) + type ShardingBirdsNest struct + func NewShardingBirdsNest(config *ShardingBirdsNestConfig, exitC chan struct{}, strategy bn.Strategy, ...) (*ShardingBirdsNest, error) + func (s *ShardingBirdsNest) Add(key bn.Key) error + func (s *ShardingBirdsNest) Adds(keys []bn.Key) (err error) + func (s *ShardingBirdsNest) AddsAndSetHeight(keys []bn.Key, height uint64) (result error) + func (s *ShardingBirdsNest) Contains(key bn.Key, rules ...bn.RuleType) (bool, error) + func (s *ShardingBirdsNest) Deserialize() error + func (s *ShardingBirdsNest) GetHeight() uint64 + func (s *ShardingBirdsNest) Info() []uint64 + func (s *ShardingBirdsNest) Infos() [][]uint64 + func (s *ShardingBirdsNest) Serialize() error + func (s *ShardingBirdsNest) SetHeight(height uint64) + func (s *ShardingBirdsNest) Start() + func (s *ShardingBirdsNest) ValidateRule(key bn.Key, rules ...bn.RuleType) error + type ShardingBirdsNestConfig struct + Birdsnest *bn.BirdsNestConfig + ChainId string + Length uint32 + Snapshot *bn.SnapshotSerializerConfig + Timeout int64