Expand description
Migration subprotocol message handler.
Dispatches inbound migration messages (subprotocol 0x0500) to the appropriate handler: orchestrator, source, or target.
Structs§
- Migration
Handler Hooks - Optional cross-cutting hooks consumed by
MigrationSubprotocolHandler::with_hooks. Each field is independently opt-in so a test that cares about one hook doesn’t have to fabricate the others;Default= nothing wired. - Migration
Identity Context - Identity-transport context for automatic envelope seal/open in the migration dispatcher.
- Migration
Subprotocol Handler - Dispatcher for migration subprotocol (
0x0500) messages. - Outbound
Migration Message - Outbound message with destination node.
Type Aliases§
- Envelope
Unseal Fn - Callback that opens an identity envelope carried on a
crate::adapter::net::state::snapshot::StateSnapshot, using a local private key captured inside the closure. SeeMigrationIdentityContextfor key-hygiene rationale. - Failure
Callback - Callback fired on the source side whenever the dispatcher
observes an inbound
MigrationFailedmessage. The SDK uses this to surface the structured reason code to theMigrationHandle::waitcaller so they can distinguish retriable from terminal failures. - Post
Restore Callback - Handles inbound migration subprotocol messages.
- PreCleanup
Callback - Callback fired on the source side at
CutoverNotifyhandling, immediately beforesource_handler.cleanupunregisters the daemon. Stage 4 ofDAEMON_CHANNEL_REBIND_PLAN.md: the SDK’s hook snapshots the daemon’s subscription ledger here and spawns asyncunsubscribe_channelcalls to each publisher so rosters drop the source immediately rather than aging out over the session-timeout window. - Readiness
Callback - Readiness predicate — returns
truewhen the local runtime is prepared to accept inbound migrations (target path). When populated and the predicate returnsfalse, the dispatcher responds toSnapshotReadywithMigrationFailureReason::NotReadyso the source can retry with backoff rather than surfacing a terminal error while the target is still booting.