pub struct Broker { /* private fields */ }Expand description
In-memory control state, resolved from the caller’s verified holder.
Implementations§
Source§impl Broker
impl Broker
Sourcepub fn new(
network: String,
recorded: BTreeMap<String, MachineIdentity>,
publisher: Arc<dyn ServicePublisher>,
) -> Self
pub fn new( network: String, recorded: BTreeMap<String, MachineIdentity>, publisher: Arc<dyn ServicePublisher>, ) -> Self
Uses the same holder-to-machine directory as the link host.
Sourcepub fn counters(&self) -> Arc<BrokerCounters> ⓘ
pub fn counters(&self) -> Arc<BrokerCounters> ⓘ
The counters shared with this broker’s echo worker.
Sourcepub fn serve(
&self,
caller: &dyn LysSession,
subject: &str,
request: &ServiceRequest<'_>,
now: u64,
) -> Result<Value, BrokerRefusal>
pub fn serve( &self, caller: &dyn LysSession, subject: &str, request: &ServiceRequest<'_>, now: u64, ) -> Result<Value, BrokerRefusal>
Decides a control call offline before parsing or changing its state.
§Errors
Missing call grant, unknown holder, malformed input, absent registration, poisoned state or a refused publication; each retains its name.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Broker
impl !RefUnwindSafe for Broker
impl !UnwindSafe for Broker
impl Send for Broker
impl Sync for Broker
impl Unpin for Broker
impl UnsafeUnpin for Broker
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