Skip to main content

register_inproc

Function register_inproc 

Source
pub fn register_inproc(
    name: impl Into<String>,
    processor: &Arc<dyn IrohRequestProcessor>,
)
Expand description

Register a co-located service’s request processor under an inproc:// name.

Called at service spawn. The name is the endpoint without the scheme (e.g. hyprstream/registry for inproc://hyprstream/registry). The caller MUST retain processor (the strong Arc) for as long as the service should be dialable — the registry only holds a Weak.

Overwriting a name whose service is still live is almost always a bug (name-squatting / double-spawn); it is logged loudly. Existing dialed clients keep the processor they captured; only future dials see the new one.