pub struct InvocationBus { /* private fields */ }Expand description
Cheap fleet-local handle for publishing and polling invocations.
Implementations§
Source§impl InvocationBus
impl InvocationBus
pub fn new(fleet: Arc<Fleet>) -> Self
pub fn node_id(&self) -> NodeId
pub fn cursor_at_head(&self) -> InvocationCursor
pub fn cursor_from_start(&self) -> InvocationCursor
Sourcepub fn reset_ring(&self) -> Result<()>
pub fn reset_ring(&self) -> Result<()>
Clear the invocation ring during quiescent owner boot.
Sourcepub fn event_fd(&self) -> Result<RingEventFd>
pub fn event_fd(&self) -> Result<RingEventFd>
Create this process’ readiness fd for the invocation ring.
Sourcepub fn submit(&self, operation: &str, payload: &[u8]) -> Result<InvocationId>
pub fn submit(&self, operation: &str, payload: &[u8]) -> Result<InvocationId>
Commit a raw invocation. Success means publication, not execution.
pub fn submit_typed<C: InvocationCodec>( &self, invocation: &C, ) -> Result<InvocationId>
Sourcepub fn poll(&self, cursor: &mut InvocationCursor) -> InvocationPoll
pub fn poll(&self, cursor: &mut InvocationCursor) -> InvocationPoll
Advance every node lane once. Ordering is lane-local, not fleet-global.
Sourcepub fn poll_operation(
&self,
cursor: &mut InvocationCursor,
operation: &str,
) -> InvocationPoll
pub fn poll_operation( &self, cursor: &mut InvocationCursor, operation: &str, ) -> InvocationPoll
Poll one operation while still advancing past every ring frame.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for InvocationBus
impl !UnwindSafe for InvocationBus
impl Freeze for InvocationBus
impl Send for InvocationBus
impl Sync for InvocationBus
impl Unpin for InvocationBus
impl UnsafeUnpin for InvocationBus
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