feat(call): initialize alknet-call crate skeleton (task: call/crate-init)
Create crates/alknet-call with Cargo.toml, lib.rs, and module skeletons for the registry (spec, context, registration, env, discovery) and protocol (wire, pending, connection, adapter, abort) subsystems. Add the crate to the workspace members list. Depends on alknet-core (workspace path), irpc (workspace dep), tokio, serde, serde_json, async-trait, tracing, thiserror, uuid, and futures. Implements ProtocolHandler on ALPN alknet/call per docs/architecture/crates/call.
This commit is contained in:
7
crates/alknet-call/src/protocol/abort.rs
Normal file
7
crates/alknet-call/src/protocol/abort.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
//! Abort cascade logic for nested calls (ADR-016).
|
||||
//!
|
||||
//! When `call.aborted` arrives for a parent request, the protocol cascades
|
||||
//! the abort to all non-terminal descendants in the call tree. Default
|
||||
//! policy is `abort-dependents`; `continue-running` is an opt-in.
|
||||
|
||||
// TODO: implement
|
||||
8
crates/alknet-call/src/protocol/adapter.rs
Normal file
8
crates/alknet-call/src/protocol/adapter.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
//! `CallAdapter`: implements `ProtocolHandler` for ALPN `alknet/call`.
|
||||
//!
|
||||
//! Accepts bidirectional streams, reads `EventEnvelope` frames, and
|
||||
//! dispatches `call.requested` events to the operation registry. See
|
||||
//! `docs/architecture/crates/call/call-protocol.md` for the full
|
||||
//! specification.
|
||||
|
||||
// TODO: implement
|
||||
8
crates/alknet-call/src/protocol/connection.rs
Normal file
8
crates/alknet-call/src/protocol/connection.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
//! `CallConnection`: an established `alknet/call` connection (either
|
||||
//! direction — accepted or opened). Holds the connection's Layer 2 overlay
|
||||
//! (imported ops).
|
||||
//!
|
||||
//! See `docs/architecture/crates/call/call-protocol.md` for the full
|
||||
//! specification.
|
||||
|
||||
// TODO: implement
|
||||
11
crates/alknet-call/src/protocol/mod.rs
Normal file
11
crates/alknet-call/src/protocol/mod.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
//! Call protocol: wire format, streams, and the call adapter.
|
||||
//!
|
||||
//! Implements `ProtocolHandler` for ALPN `alknet/call` on top of the
|
||||
//! operation registry. See `docs/architecture/crates/call/call-protocol.md`
|
||||
//! for the full specification.
|
||||
|
||||
pub mod abort;
|
||||
pub mod adapter;
|
||||
pub mod connection;
|
||||
pub mod pending;
|
||||
pub mod wire;
|
||||
7
crates/alknet-call/src/protocol/pending.rs
Normal file
7
crates/alknet-call/src/protocol/pending.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
//! Pending request tracking: `PendingRequestMap` and `PendingEntry`.
|
||||
//!
|
||||
//! Correlates `call.responded` events back to the original `call.requested`
|
||||
//! by request ID. See `docs/architecture/crates/call/call-protocol.md` for
|
||||
//! the full specification.
|
||||
|
||||
// TODO: implement
|
||||
7
crates/alknet-call/src/protocol/wire.rs
Normal file
7
crates/alknet-call/src/protocol/wire.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
//! Wire format: `EventEnvelope`, `ResponseEnvelope`, `CallError`, and
|
||||
//! length-prefixed JSON framing.
|
||||
//!
|
||||
//! See `docs/architecture/crates/call/call-protocol.md` for the full
|
||||
//! specification.
|
||||
|
||||
// TODO: implement
|
||||
Reference in New Issue
Block a user