pub struct ConnectionSupervisorBuilder { /* private fields */ }Expand description
Composes a ConnectionSupervisor over caller-owned services.
Any of the optional parts — [auth] (bearer + pass verifier), a connection
notifier, operational limits — can be set together. Minted by
ConnectionSupervisor::builder.
Implementations§
Source§impl ConnectionSupervisorBuilder
impl ConnectionSupervisorBuilder
Sourcepub fn auth(self, auth: &AuthConfig) -> Result<Self, ServerError>
pub fn auth(self, auth: &AuthConfig) -> Result<Self, ServerError>
Installs the configured [auth] section: the bearer token, and the
registry pass verifier when auth.pass is present — derived exactly as
ConnectionSupervisor::from_config derives them.
§Errors
Returns ServerError::ConfigValidation when auth.pass names a key
that is not exactly one valid Ed25519 verifying key as 64 hexadecimal
digits — the same error, with the same text, that from_config returns
for that configuration.
Sourcepub fn notifier(self, notifier: Arc<dyn ConnectionNotifier>) -> Self
pub fn notifier(self, notifier: Arc<dyn ConnectionNotifier>) -> Self
Installs the connection-keyed notifier, invoked on worker registration lifecycle and on pass-stamped attach/detach.
Sourcepub const fn limits(self, limits: LimitsConfig) -> Self
pub const fn limits(self, limits: LimitsConfig) -> Self
Installs the operational limits (§5); unset, the signed defaults apply.
Sourcepub fn build(self) -> Result<ConnectionSupervisor, ServerError>
pub fn build(self) -> Result<ConnectionSupervisor, ServerError>
Starts the supervisor.
§Errors
Returns ServerError when incarnation startup or scheduler startup
fails.