sharded

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidNumberOfShards = errors.New("the number of shards must be greater than zero")

ErrInvalidNumberOfShards signals that an invalid number of shards was passed to the sharding registry

View Source
var ErrInvalidPath = errors.New("invalid path")

ErrInvalidPath signals that an invalid path has been provided

View Source
var ErrNilIDProvider = errors.New("nil id provider")

ErrNilIDProvider signals that a nil id provider was provided

View Source
var ErrNilPersisterCreator = errors.New("nil persister creator")

ErrNilPersisterCreator signals that a nil persister creator was provided

Functions

func NewShardIDProvider

func NewShardIDProvider(numOfShards int32) (*shardIDProvider, error)

NewShardIDProvider will create a new shard ID provider component

func NewShardedPersister

func NewShardedPersister(path string, persisterCreator types.PersisterCreator, idProvider types.ShardIDProvider) (*shardedPersister, error)

NewShardedPersister will created a new sharded persister

Types

This section is empty.

Jump to

Keyboard shortcuts

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