Struct libsql_replication::Replicator
source · pub struct Replicator {
pub frames_sender: Sender<Frames>,
pub current_frame_no_notifier: Receiver<FrameNo>,
pub meta: Arc<Mutex<Option<WalIndexMeta>>>,
pub injector: FrameInjector<'static>,
pub client: Option<Client>,
pub next_offset: AtomicU64,
/* private fields */
}
Fields§
§frames_sender: Sender<Frames>
§current_frame_no_notifier: Receiver<FrameNo>
§meta: Arc<Mutex<Option<WalIndexMeta>>>
§injector: FrameInjector<'static>
§client: Option<Client>
§next_offset: AtomicU64
Implementations§
source§impl Replicator
impl Replicator
pub fn new(path: impl AsRef<Path>) -> Result<Self>
pub async fn init_metadata( &mut self, endpoint: impl AsRef<str>, auth_token: impl AsRef<str> ) -> Result<WalIndexMeta>
pub fn update_metadata_from_snapshot_header( &self, path: impl AsRef<Path> ) -> Result<()>
pub fn writer(&self) -> Result<Writer>
pub fn sync(&self, frames: Frames) -> Result<()>
pub async fn sync_from_http(&self) -> Result<usize>
Auto Trait Implementations§
impl !RefUnwindSafe for Replicator
impl Send for Replicator
impl !Sync for Replicator
impl Unpin for Replicator
impl !UnwindSafe for Replicator
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request