pub enum ModuleProtocol {
Subc,
None,
}Expand description
Which wire protocol a supervised module speaks to subc, as DECLARED in daemon config. Never inferred from observed behaviour.
The distinction this exists to keep is between a module that should have
registered and has not yet, and one that never will. A Subc module that has
not registered is a subc module that is LATE – it may be booting, it may be
wedged, and the supervisor’s health probing and restart escalation are the
right response. A None module is a third-party process (the NATS server is
the first) that subc launches, supervises, and stops, and that is all: it
speaks no subc wire at all, so treating its silence as a fault would restart
a perfectly healthy process forever.
Inferring the difference from “has not registered within N seconds” would collapse exactly the two cases that must stay apart, which is why this is a declaration.
Variants§
Subc
The module registers over channel 0, answers health.check, and can
serve routes. Every module predating this field is one of these, which is
why it is the default.
None
The module speaks no subc wire. It is supervised as a process only.
Trait Implementations§
Source§impl Clone for ModuleProtocol
impl Clone for ModuleProtocol
Source§fn clone(&self) -> ModuleProtocol
fn clone(&self) -> ModuleProtocol
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more