Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Partitoner ¶
type Partitoner[T any] struct { // contains filtered or unexported fields }
func NewPartitoner ¶
func NewPartitoner[T any](partitions uint, hashFn func(T) (uint64, error), opts ...PartitonerOption[T]) *Partitoner[T]
Partitoner factory function
func (Partitoner[T]) Examine ¶
func (p Partitoner[T]) Examine()
func (*Partitoner[T]) PartitionData ¶
func (p *Partitoner[T]) PartitionData(dataChannel <-chan T) []chan T
TODO: impl wg to ensure no loss of data WARNING!: There can be loss of data if the service starts to shutdown
type PartitonerOption ¶
type PartitonerOption[T any] func(*Partitoner[T])
func WithBufferSize ¶
func WithBufferSize[T any](size int) PartitonerOption[T]
func WithContext ¶
func WithContext[T any](ctx context.Context) PartitonerOption[T]
func WithMaxRetries ¶
func WithMaxRetries[T any](retries int) PartitonerOption[T]
Click to show internal directories.
Click to hide internal directories.