Documentation ¶
Overview ¶
Package distribconsistent implements a Rafty Distributor which uses the github.com/buraksezer/consistent library to distribute work amongst the Rafty members.
Index ¶
- func New[T any, T2 interfaces.Work[T]](options ...Option[T, T2]) (*distributor[T, T2], error)
- type Option
- func Hasher[T any, T2 interfaces.Work[T]](hasher consistent.Hasher) Option[T, T2]
- func Load[T any, T2 interfaces.Work[T]](load float64) Option[T, T2]
- func PartitionCountOption[T any, T2 interfaces.Work[T]](count int) Option[T, T2]
- func ReplicationFactor[T any, T2 interfaces.Work[T]](factor int) Option[T, T2]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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]
Click to show internal directories.
Click to hide internal directories.