pub struct SessionRpcEventLog<'a> { /* private fields */ }Expand description
session.eventLog.* RPCs.
Implementations§
Source§impl<'a> SessionRpcEventLog<'a>
impl<'a> SessionRpcEventLog<'a>
Sourcepub async fn read(
&self,
params: EventLogReadRequest,
) -> Result<EventsReadResult, Error>
pub async fn read( &self, params: EventLogReadRequest, ) -> Result<EventsReadResult, Error>
Reads a batch of session events from a cursor, optionally waiting for new events.
Wire method: session.eventLog.read.
§Parameters
params- Cursor, batch size, and optional long-poll/filter parameters for reading session events.
§Returns
Batch of session events returned by a read, with cursor and continuation metadata.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn tail(&self) -> Result<EventLogTailResult, Error>
pub async fn tail(&self) -> Result<EventLogTailResult, Error>
Returns a snapshot of the current tail cursor without consuming events.
Wire method: session.eventLog.tail.
§Returns
Snapshot of the current tail cursor without returning any events. Use this when a consumer wants to subscribe to live events going forward without first paginating through the entire persisted history (which would happen if read were called without a cursor on a long-lived session).
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn register_interest(
&self,
params: RegisterEventInterestParams,
) -> Result<RegisterEventInterestResult, Error>
pub async fn register_interest( &self, params: RegisterEventInterestParams, ) -> Result<RegisterEventInterestResult, Error>
Registers consumer interest in an event type for runtime gating purposes.
Wire method: session.eventLog.registerInterest.
§Parameters
params- Event type to register consumer interest for, used by runtime gating logic.
§Returns
Opaque handle representing an event-type interest registration.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn release_interest(
&self,
params: ReleaseEventInterestParams,
) -> Result<EventLogReleaseInterestResult, Error>
pub async fn release_interest( &self, params: ReleaseEventInterestParams, ) -> Result<EventLogReleaseInterestResult, Error>
Releases a consumer’s previously-registered interest in an event type.
Wire method: session.eventLog.releaseInterest.
§Parameters
params- Opaque handle previously returned byregisterInterestto release.
§Returns
Indicates whether the operation succeeded.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for SessionRpcEventLog<'a>
impl<'a> Clone for SessionRpcEventLog<'a>
Source§fn clone(&self) -> SessionRpcEventLog<'a>
fn clone(&self) -> SessionRpcEventLog<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more