Skip to main content

spawn

Function spawn 

Source
pub fn spawn(
    bind_addr: SocketAddr,
    promote: Option<Arc<AtomicBool>>,
    rotate_requested: Option<Arc<AtomicBool>>,
    durability_mode: Option<Arc<AtomicU8>>,
    shutdown: Arc<AtomicBool>,
    authorized_keys: Arc<AuthorizedKeys>,
) -> JoinHandle<()>
Expand description

Spawn the admin listener on a dedicated thread.

Any of promote / rotate_requested / durability_mode may be None to disable the corresponding command on this node. The listener still accepts connections and authenticates them — a disabled command is rejected at the command-dispatch step, not at connect time, so operator tooling sees a structured ERR rather than a TCP RST.