You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
681 B
25 lines
681 B
package cluster |
|
|
|
// Strategy for partition to consumer assignement |
|
type Strategy string |
|
|
|
const ( |
|
// StrategyRange is the default and assigns partition ranges to consumers. |
|
// Example with six partitions and two consumers: |
|
// C1: [0, 1, 2] |
|
// C2: [3, 4, 5] |
|
StrategyRange Strategy = "range" |
|
|
|
// StrategyRoundRobin assigns partitions by alternating over consumers. |
|
// Example with six partitions and two consumers: |
|
// C1: [0, 2, 4] |
|
// C2: [1, 3, 5] |
|
StrategyRoundRobin Strategy = "roundrobin" |
|
) |
|
|
|
// Error instances are wrappers for internal errors with a context and |
|
// may be returned through the consumer's Errors() channel |
|
type Error struct { |
|
Ctx string |
|
error |
|
}
|
|
|