pub struct EngineClient { /* private fields */ }Expand description
Client for communicating with the AGNT5 Engine.
Uses a pool of N independent gRPC connections with round-robin selection. This prevents the h2 PoisonError that occurs when many concurrent checkpoint events are routed through a single HTTP/2 connection.
Implementations§
Source§impl EngineClient
impl EngineClient
Sourcepub async fn connect(endpoint: &str) -> Result<Self>
pub async fn connect(endpoint: &str) -> Result<Self>
Connect to the engine at the given endpoint with a pool of connections.
Sourcepub async fn begin_activation(
&mut self,
request: BeginActivationRequest,
) -> Result<BeginActivationResponse>
pub async fn begin_activation( &mut self, request: BeginActivationRequest, ) -> Result<BeginActivationResponse>
Admit one logical activation and return the journal-authoritative decision.
Sourcepub async fn complete_activation(
&mut self,
request: CompleteActivationRequest,
) -> Result<CompleteActivationResponse>
pub async fn complete_activation( &mut self, request: CompleteActivationRequest, ) -> Result<CompleteActivationResponse>
Commit one fenced activation completion and wait for its durability acknowledgement.
Sourcepub async fn fail_activation(
&mut self,
request: FailActivationRequest,
) -> Result<FailActivationResponse>
pub async fn fail_activation( &mut self, request: FailActivationRequest, ) -> Result<FailActivationResponse>
Commit one fenced activation failure and wait for its durability acknowledgement.
Sourcepub async fn suspend_activation(
&mut self,
request: SuspendActivationRequest,
) -> Result<SuspendActivationResponse>
pub async fn suspend_activation( &mut self, request: SuspendActivationRequest, ) -> Result<SuspendActivationResponse>
Atomically park one fenced activation and its parent run until a durable timer generation is ready.
Sourcepub async fn append(&mut self, record: Record) -> Result<(u64, i64)>
pub async fn append(&mut self, record: Record) -> Result<(u64, i64)>
Append a single record to the engine.
Sourcepub async fn append_batch(&mut self, records: Vec<Record>) -> Result<i32>
pub async fn append_batch(&mut self, records: Vec<Record>) -> Result<i32>
Append a batch of records to the engine.
Sourcepub async fn stream_events(
&mut self,
events: Vec<EventStreamMessage>,
) -> Result<i64>
pub async fn stream_events( &mut self, events: Vec<EventStreamMessage>, ) -> Result<i64>
Publish a bounded batch of ephemeral events and wait until the runtime acknowledges every frame. Closing each batch supplies the ordering barrier needed before a durable terminal event is appended.
Trait Implementations§
Source§impl Clone for EngineClient
impl Clone for EngineClient
Auto Trait Implementations§
impl !RefUnwindSafe for EngineClient
impl !UnwindSafe for EngineClient
impl Freeze for EngineClient
impl Send for EngineClient
impl Sync for EngineClient
impl Unpin for EngineClient
impl UnsafeUnpin for EngineClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§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>
T in a tonic::Request