-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change: add RaftError as API return error type.
Add `RaftError<E>` as error type returned by every `Raft::xxx()` API. RaftError has two variants: Fatal error or API specific error. This way every API error such as AppendEntriesError does not have to include an `Fatal` in it. Upgrade tip: The affected types is mainly `trait RaftNetwork`, an application should replace AppendEntriesError, VoteError, InstallSnapshotError with `RaftError<_>`, `RaftError<_>`, and `RaftError<_, InstallSnapshotError>`. So is for other parts, e.g., `Raft::append_entries()` now returns `Result<AppendEntriesResponse, RaftError<_>>`, an application should also rewrite error handling that calls these APIs. See changes in examples/.
- Loading branch information
1 parent
77e87a3
commit fbb3f21
Showing
17 changed files
with
311 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.