pub struct Agent(/* private fields */);Implementations§
Source§impl Agent
impl Agent
pub fn new(config: AgentConfig) -> Self
pub fn actor<C: Into<Option<ClusterId>>>(&self, cluster_id: C) -> Actor
Sourcepub fn pool(&self) -> &SplitPool
pub fn pool(&self) -> &SplitPool
Return a borrowed SqlitePool
pub fn actor_id(&self) -> ActorId
pub fn clock(&self) -> &Arc<HLC>
pub fn gossip_addr(&self) -> SocketAddr
pub fn external_addr(&self) -> Option<SocketAddr>
pub fn api_addr(&self) -> SocketAddr
pub fn tx_bcast(&self) -> &CorroSender<BroadcastInput>
pub fn tx_apply(&self) -> &CorroSender<(ActorId, CrsqlDbVersion)>
pub fn tx_changes(&self) -> &CorroSender<(ChangeV1, ChangeSource)>
pub fn tx_clear_buf( &self, ) -> &CorroSender<(ActorId, RangeInclusive<CrsqlDbVersion>)>
pub fn tx_foca(&self) -> &CorroSender<FocaInput>
pub fn write_sema(&self) -> &Arc<Semaphore>
pub async fn write_permit(&self) -> Result<OwnedSemaphorePermit, AcquireError>
pub fn write_permit_blocking( &self, ) -> Result<OwnedSemaphorePermit, AcquireError>
pub fn booked(&self) -> &Booked
pub fn members(&self) -> &RwLock<Members>
pub fn schema(&self) -> &RwLock<Schema>
pub fn db_path(&self) -> Utf8PathBuf
pub fn config(&self) -> Guard<Arc<Config>, DefaultStrategy>
pub fn set_config(&self, new_conf: Config)
pub fn limits(&self) -> &Limits
pub fn subs_manager(&self) -> &SubsManager
pub fn updates_manager(&self) -> &UpdatesManager
pub fn set_cluster_id(&self, cluster_id: ClusterId)
pub fn cluster_id(&self) -> ClusterId
pub fn update_clock_with_timestamp( &self, actor_id: ActorId, ts: Timestamp, ) -> Result<(), String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Agent
impl !RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl !UnwindSafe for Agent
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more