distribconsistent

package module
v0.0.0-...-6de2257 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package distribconsistent implements a Rafty Distributor which uses the github.com/buraksezer/consistent library to distribute work amongst the Rafty members.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T any, T2 interfaces.Work[T]](options ...Option[T, T2]) (*distributor[T, T2], error)

Types

type Option

type Option[T any, T2 interfaces.Work[T]] func(*distributor[T, T2]) error

func Hasher

func Hasher[T any, T2 interfaces.Work[T]](hasher consistent.Hasher) Option[T, T2]

func Load

func Load[T any, T2 interfaces.Work[T]](load float64) Option[T, T2]

func PartitionCountOption

func PartitionCountOption[T any, T2 interfaces.Work[T]](count int) Option[T, T2]

func ReplicationFactor

func ReplicationFactor[T any, T2 interfaces.Work[T]](factor int) Option[T, T2]

Jump to

Keyboard shortcuts

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