Skip to main content

ControlStore

Struct ControlStore 

Source
pub struct ControlStore { /* private fields */ }

Implementations§

Source§

impl ControlStore

Source

pub fn open(path: impl AsRef<Path>, identity: &ControlIdentity) -> Result<Self>

Opens and validates an existing sidecar, or creates it if absent.

Source

pub fn create( path: impl AsRef<Path>, identity: &ControlIdentity, ) -> Result<Self>

Source

pub fn open_existing( path: impl AsRef<Path>, identity: &ControlIdentity, ) -> Result<Self>

Source

pub fn open_existing_unchecked(path: impl AsRef<Path>) -> Result<Self>

Opens a sidecar and validates its durable format without imposing an expected runtime identity. This is used by recovery paths that must load the persisted identity before they can validate the paired user DB.

Source

pub fn read_identity(path: impl AsRef<Path>) -> Result<ControlIdentity>

Source

pub fn path(&self) -> &Path

Source

pub fn identity(&self) -> Result<ControlIdentity>

Source

pub fn applied_tip(&self) -> Result<ApplyProgress>

Source

pub fn configuration_state(&self) -> Result<ConfigurationState>

Source

pub fn recovery_generation(&self) -> Result<u64>

Source

pub fn materializer_fingerprint(&self) -> Result<LogHash>

Source

pub fn user_state(&self) -> Result<StateIdentityV3>

Source

pub fn lookup_request( &self, request_id: &str, request_digest: LogHash, ) -> Result<Option<RequestReceipt>>

Source

pub fn lookup_requests( &self, requests: &[(&str, LogHash)], ) -> Result<Vec<Result<Option<RequestReceipt>>>>

Returns receipts in the exact order of the requested (id, digest) pairs using one bounded control-sidecar query.

Request ids must be unique. Missing ids produce Ok(None); an existing id with another digest produces an aligned request-conflict error so a caller can isolate that member without issuing another query.

Source

pub fn embedded_log_entries( &self, from_index: u64, through_index: u64, ) -> Result<Vec<LogEntry>>

Returns a contiguous interval from the qlog embedded in the control sidecar.

Source

pub fn pending(&self) -> Result<Option<PendingApply>>

Source

pub fn export_replicated_snapshot(&self) -> Result<Vec<u8>>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.