-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy patherror.go
More file actions
24 lines (21 loc) · 744 Bytes
/
error.go
File metadata and controls
24 lines (21 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package healer
type HealerError int32
func (healerError *HealerError) Error() string {
switch *healerError {
case 1:
return "max.bytes parameter is too small. This size must be at least as large as the maximum message size the server allows or else it is possible for the producer to send messages larger than the consumer can fetch. If that happens, the consumer can get stuck trying to fetch a large message on a certain partition."
case 2:
return "NO partitionResponse?"
case 3:
return "payload to decode is empty"
case 4:
return "no avaliable brokers"
}
return ""
}
var (
maxBytesTooSmall HealerError = 1
noPartitionResponse HealerError = 2
emptyPayload HealerError = 3
noAvaliableBrokers HealerError = 4
)