Send rpc.superseded with the newly active hash before activation returns. Add an opt-in SDK hook and drain helper that closes SDK listeners and idle connections without cancelling active handlers or background work. Document the additive notice and preserve existing grace, stop and restart rules. Cover immediate notices, ignored notices, early service restarts, SDK draining and duplicate-hook diagnostics. Card: SAU-352
12 lines
326 B
Rust
12 lines
326 B
Rust
struct Supersedes;
|
|
#[sausage_plugin::rpc]
|
|
impl Supersedes {
|
|
/// First superseded hook.
|
|
#[sausage_plugin::on_superseded]
|
|
fn a(&self) -> sausage_plugin::Result<()> { Ok(()) }
|
|
/// Second superseded hook.
|
|
#[sausage_plugin::on_superseded]
|
|
fn b(&self) -> sausage_plugin::Result<()> { Ok(()) }
|
|
}
|
|
fn main() {}
|