pub struct ServiceBindings { /* private fields */ }Expand description
Administrative effect seams and an optional address broker, bound once.
Implementations§
Source§impl ServiceBindings
impl ServiceBindings
Sourcepub fn new(
http: &Arc<dyn LysHttp>,
bearer: &str,
machine: String,
publisher: &Arc<dyn ServicePublisher>,
) -> Self
pub fn new( http: &Arc<dyn LysHttp>, bearer: &str, machine: String, publisher: &Arc<dyn ServicePublisher>, ) -> Self
Binds every seam: Lys asked through http with bearer (this
machine’s own pass), seats started on machine, messages published
through publisher.
Sourcepub const fn watches_context(&self) -> bool
pub const fn watches_context(&self) -> bool
Whether the operator asked for the context watch to run.
Sourcepub fn context_reporter(&self) -> Arc<ContextReporter> ⓘ
pub fn context_reporter(&self) -> Arc<ContextReporter> ⓘ
The reporter the context watch shares with the context-watch call.
Sourcepub const fn broker(&self) -> Option<&Broker>
pub const fn broker(&self) -> Option<&Broker>
The configured address broker, independent of administrative services.
Sourcepub fn echo_address(&self) -> Option<SocketAddr>
pub fn echo_address(&self) -> Option<SocketAddr>
The address actually bound by the configured broker’s UDP echo.
Sourcepub const fn relay(&self) -> Option<&Arc<Relay>>
pub const fn relay(&self) -> Option<&Arc<Relay>>
The configured blind relay, independent of administrative services.
Sourcepub fn relay_topology_local(&self) -> Option<&str>
pub fn relay_topology_local(&self) -> Option<&str>
The console’s canonical local endpoint for relay observations.
Sourcepub fn serve_broker(
&self,
session: Option<&dyn LysSession>,
subject: &str,
request: &ServiceRequest<'_>,
now: u64,
) -> Result<Value, BrokerRefusal>
pub fn serve_broker( &self, session: Option<&dyn LysSession>, subject: &str, request: &ServiceRequest<'_>, now: u64, ) -> Result<Value, BrokerRefusal>
Serves a broker request on the connection’s admitted session.
§Errors
The broker or admitted session is absent, or the broker refuses the call.
Sourcepub fn configure(
lys: &LysConfig,
services: Arc<LiminalConnectionServices>,
handle: Handle,
now: u64,
) -> Result<Option<Self>, ServiceEffectError>
pub fn configure( lys: &LysConfig, services: Arc<LiminalConnectionServices>, handle: Handle, now: u64, ) -> Result<Option<Self>, ServiceEffectError>
Builds configured services when the boot machine pass is present.
Ok(None) when no services are selected or a dial pass was refused.
Lys is asked on handle’s runtime; messages are published through
services as liminal.<host>.
§Errors
[auth.lys.machine] is absent (the services would have no identity to
ask Lys as), this machine’s pass or the issuer’s key set cannot be
read or does not verify, or the issuer is not an HTTP origin.