shardmanager

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShardManager

type ShardManager struct {
	// contains filtered or unexported fields
}

func NewShardManager

func NewShardManager(shardCount int, globalErrorChan chan error) *ShardManager

NewShardManager creates a new ShardManager instance with the given number of Shards and a parent context.

func (*ShardManager) GetShardForKey

func (manager *ShardManager) GetShardForKey(key string) *shard.Shard

func (*ShardManager) Run

func (manager *ShardManager) Run(ctx context.Context)

Run starts the ShardManager, manages its lifecycle, and listens for errors.

func (*ShardManager) ShardCount

func (manager *ShardManager) ShardCount() int8

GetShardCount returns the number of shards managed by this ShardManager.

func (*ShardManager) Shards

func (manager *ShardManager) Shards() []*shard.Shard

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL