sharding

package
v0.0.0-...-dc9ea58 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 1 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 {
	ShardID     int
	TotalShards int
}

ShardManager determines if the current manager instance is responsible for a given resource

func NewShardManager

func NewShardManager(shardID, totalShards int) *ShardManager

NewShardManager creates a new ShardManager

func (*ShardManager) IsResponsibleFor

func (s *ShardManager) IsResponsibleFor(key string) bool

IsResponsibleFor returns true if the current shard is responsible for the given key

Jump to

Keyboard shortcuts

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