WithCustomHashFunction lets you specify what hash function to use for the partitioning
(hasher func() hash.Hash32)
| 65 | |
| 66 | // WithCustomHashFunction lets you specify what hash function to use for the partitioning |
| 67 | func WithCustomHashFunction(hasher func() hash.Hash32) HashPartitionerOption { |
| 68 | return func(hp *hashPartitioner) { |
| 69 | hp.hasher = hasher() |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | // WithCustomFallbackPartitioner lets you specify what HashPartitioner should be used in case a Distribution Key is empty |
| 74 | func WithCustomFallbackPartitioner(randomHP Partitioner) HashPartitionerOption { |
no outgoing calls