Trait grid_sdk::commits::store::CommitStore [−][src]
pub trait CommitStore: Send + Sync { fn add_commit(&self, commit: Commit) -> Result<(), CommitStoreError>; fn get_commit_by_commit_num(
&self,
commit_num: i64
) -> Result<Option<Commit>, CommitStoreError>; fn get_current_commit_id(&self) -> Result<Option<String>, CommitStoreError>; fn get_current_service_commits(
&self
) -> Result<Vec<Commit>, CommitStoreError>; fn get_next_commit_num(&self) -> Result<i64, CommitStoreError>; fn resolve_fork(&self, commit_num: i64) -> Result<(), CommitStoreError>; fn create_db_commit_from_commit_event(
&self,
event: &CommitEvent
) -> Result<Option<Commit>, CommitStoreError>; }
Required methods
fn add_commit(&self, commit: Commit) -> Result<(), CommitStoreError>
fn add_commit(&self, commit: Commit) -> Result<(), CommitStoreError>
fn get_commit_by_commit_num(
&self,
commit_num: i64
) -> Result<Option<Commit>, CommitStoreError>
fn get_commit_by_commit_num(
&self,
commit_num: i64
) -> Result<Option<Commit>, CommitStoreError>
fn get_current_commit_id(&self) -> Result<Option<String>, CommitStoreError>
fn get_current_commit_id(&self) -> Result<Option<String>, CommitStoreError>
Gets the current commit ID from the underlying storage
fn get_current_service_commits(&self) -> Result<Vec<Commit>, CommitStoreError>
fn get_current_service_commits(&self) -> Result<Vec<Commit>, CommitStoreError>
Gets all the current commits on services.
This returns the latest commit values for all commits where commit.service_id is not
None.
fn get_next_commit_num(&self) -> Result<i64, CommitStoreError>
fn get_next_commit_num(&self) -> Result<i64, CommitStoreError>
Gets the next commit number from the underlying storage