-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: update
raft-kv-memstore
example to use storage v2
- Loading branch information
Showing
6 changed files
with
137 additions
and
118 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
use std::sync::Arc; | ||
|
||
use crate::LogStore; | ||
use crate::NodeId; | ||
use crate::Raft; | ||
use crate::Store; | ||
use crate::StateMachineStore; | ||
|
||
// Representation of an application state. This struct can be shared around to share | ||
// instances of raft, store and more. | ||
pub struct App { | ||
pub id: NodeId, | ||
pub addr: String, | ||
pub raft: Raft, | ||
pub store: Arc<Store>, | ||
pub log_store: Arc<LogStore>, | ||
pub state_machine_store: Arc<StateMachineStore>, | ||
pub config: Arc<openraft::Config>, | ||
} |
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.