Documentation ¶
Overview ¶
Package rafterrors annotates Raft errors with gRPC status codes.
Use MarkRetriable/MarkUnretriable to add a gRPC status code.
Use MarkRetriable for atomic operations like Apply, ApplyLog, Barrier, changing configuration/voters.
Use MarkUnretriable if your own application already made changes that it didn't roll back and for Restore. Restore does multiple operation, and errors could be from the first or second and it's unsafe to distinguish.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarkRetriable ¶
MarkRetriable annotates a Raft error with a gRPC status code, given that the entire operation is retriable.
func MarkUnretriable ¶
MarkUnretriable annotates a Raft error with a gRPC status code, given that the entire operation is not retriable.
func RetriableCode ¶
RetriableCode returns a gRPC status code for a given Raft error, given that the entire operation is retriable.
func UnretriableCode ¶
Code returns a gRPC status code for a given Raft error, given that the entire operation is not retriable.
Types ¶
This section is empty.