docs: rename pass — update crate refs from alknet-* to alkcall
Update doc comments referencing the old alknet-* crate names and spec paths to reflect the alkcall home. ALPN strings (alknet/call, alknet/test) are wire-stable and unchanged. Sibling crate refs (alknet-http, alknet-core historical context) kept as-is — those are accurate references to crates that still exist or will be reworked later. Also fixes the pre-existing broken intra-doc link [`CallAdapter`] in dispatch.rs (now [`super::adapter::CallAdapter`]) — the only doc warning carried over from the extraction. Verification: - cargo test: 343 passed (0 failed) - cargo clippy --all-targets -- -D warnings: clean - cargo fmt --check: clean - cargo doc --no-deps: clean (0 warnings, was 1)
This commit is contained in:
@@ -12,10 +12,10 @@
|
|||||||
//! `abort()`) and a callee (dispatches incoming calls against its registry).
|
//! `abort()`) and a callee (dispatches incoming calls against its registry).
|
||||||
//!
|
//!
|
||||||
//! Transport-level connection establishment (QUIC dial, TCP+TLS, iroh) is
|
//! Transport-level connection establishment (QUIC dial, TCP+TLS, iroh) is
|
||||||
//! handled by `alknet-client`; `CallClient::spawn_dispatch` takes a
|
//! handled by the consumer; `CallClient::spawn_dispatch` takes a
|
||||||
//! pre-established `Connection` and runs the call protocol over it.
|
//! pre-established `Connection` and runs the call protocol over it.
|
||||||
//!
|
//!
|
||||||
//! See `docs/architecture/crates/call/client-and-adapters.md` for the spec.
|
//! See `docs/architecture/` for the spec.
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
//! implemented in `registry/discovery.rs`; `from_call` is the client-side
|
//! implemented in `registry/discovery.rs`; `from_call` is the client-side
|
||||||
//! consumer of that API.
|
//! consumer of that API.
|
||||||
//!
|
//!
|
||||||
//! See `docs/architecture/crates/call/client-and-adapters.md` §from_call for
|
//! See `docs/architecture/` §from_call for
|
||||||
//! the spec and the v1 defaults (auto-on-reconnect, error-on-collision).
|
//! the spec and the v1 defaults (auto-on-reconnect, error-on-collision).
|
||||||
|
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
//! Client adapters: turn external operation sources (JSON Schema, OpenAPI,
|
//! Client adapters: turn external operation sources (JSON Schema, OpenAPI,
|
||||||
//! MCP, remote `from_call` peers) into `HandlerRegistration` bundles.
|
//! MCP, remote `from_call` peers) into `HandlerRegistration` bundles.
|
||||||
//!
|
//!
|
||||||
//! See `docs/architecture/crates/call/client-and-adapters.md` for the
|
//! See `docs/architecture/` for the OperationAdapter trait and the Adapter
|
||||||
//! OperationAdapter trait and the Adapter Location Map, and
|
//! Location Map, and ADR-017 §5 for the trait contract.
|
||||||
//! `docs/architecture/decisions/017-call-protocol-client-and-adapter-contract.md`
|
|
||||||
//! §5 for the trait contract.
|
|
||||||
|
|
||||||
mod call_client;
|
mod call_client;
|
||||||
mod from_call;
|
mod from_call;
|
||||||
@@ -55,8 +53,7 @@ pub enum AdapterError {
|
|||||||
/// `from_openapi` reading a static spec) trivially satisfy
|
/// `from_openapi` reading a static spec) trivially satisfy
|
||||||
/// an async trait — their `import()` bodies contain no `.await` points.
|
/// an async trait — their `import()` bodies contain no `.await` points.
|
||||||
///
|
///
|
||||||
/// See ADR-017 §5 (`docs/architecture/decisions/017-call-protocol-client-and-adapter-contract.md`)
|
/// See ADR-017 §5 and `docs/architecture/`.
|
||||||
/// and `docs/architecture/crates/call/client-and-adapters.md`.
|
|
||||||
#[async_trait::async_trait]
|
#[async_trait::async_trait]
|
||||||
pub trait OperationAdapter: Send + Sync {
|
pub trait OperationAdapter: Send + Sync {
|
||||||
async fn import(&self) -> Result<Vec<HandlerRegistration>, AdapterError>;
|
async fn import(&self) -> Result<Vec<HandlerRegistration>, AdapterError>;
|
||||||
|
|||||||
14
src/lib.rs
14
src/lib.rs
@@ -1,17 +1,19 @@
|
|||||||
//! alkcall: Call + channels RPC — operations, streaming, service discovery,
|
//! alkcall: Call + channels RPC — operations, streaming, service discovery,
|
||||||
//! and N-channel multiplexing over one transport stream.
|
//! and N-channel multiplexing over one transport stream.
|
||||||
//!
|
//!
|
||||||
//! This crate unifies `alknet-call` (structured JSON RPC: operations,
|
//! This crate is the unification of the call protocol (structured JSON RPC:
|
||||||
//! streaming subscriptions, service discovery) and `alknet-channels`
|
//! operations, streaming subscriptions, service discovery) and the channels
|
||||||
//! (multiplexing proxy: N logical channels over one transport stream,
|
//! protocol (multiplexing proxy: N logical channels over one transport
|
||||||
//! channel 0 pre-negotiated as `alknet/call`).
|
//! stream, channel 0 pre-negotiated as `alknet/call`). Both halves share
|
||||||
|
//! the vendored core types and the call protocol's `OperationRegistry` —
|
||||||
|
//! channel lifecycle is orchestrated by call operations on channel 0.
|
||||||
//!
|
//!
|
||||||
//! ## Architecture
|
//! ## Architecture
|
||||||
//!
|
//!
|
||||||
//! - **Vendored core types** ([`core`]): `Connection`, `ProtocolHandler`,
|
//! - **Vendored core types** ([`core`]): `Connection`, `ProtocolHandler`,
|
||||||
//! `BiStream`, `BidiStreamSource`, `AuthContext`, `IdentityProvider`,
|
//! `BiStream`, `BidiStreamSource`, `AuthContext`, `IdentityProvider`,
|
||||||
//! `Capabilities`, `OwnershipProvider` — the home for the former
|
//! `Capabilities`, `OwnershipProvider` — the home for these types
|
||||||
//! `alknet-core` surface.
|
//! going forward.
|
||||||
//! - **Registry** ([`registry`]): operation specs, context, dispatch, and
|
//! - **Registry** ([`registry`]): operation specs, context, dispatch, and
|
||||||
//! the operation registry — the call half's dispatch core.
|
//! the operation registry — the call half's dispatch core.
|
||||||
//! - **Protocol** ([`protocol`]): wire format, streams, adapter, dispatch
|
//! - **Protocol** ([`protocol`]): wire format, streams, adapter, dispatch
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
//!
|
//!
|
||||||
//! Accepts bidirectional streams, reads `EventEnvelope` frames, and
|
//! Accepts bidirectional streams, reads `EventEnvelope` frames, and
|
||||||
//! dispatches `call.requested` events to the operation registry. See
|
//! dispatches `call.requested` events to the operation registry. See
|
||||||
//! `docs/architecture/crates/call/call-protocol.md` for the full
|
//! `docs/architecture/` for the full specification.
|
||||||
//! specification.
|
|
||||||
//!
|
//!
|
||||||
//! The dispatch loop is shared with [`crate::client::CallClient`] via
|
//! The dispatch loop is shared with [`crate::client::CallClient`] via
|
||||||
//! [`super::dispatch::Dispatcher`] (ADR-017 §1): `CallAdapter` is the
|
//! [`super::dispatch::Dispatcher`] (ADR-017 §1): `CallAdapter` is the
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
//! direction — accepted or opened). Holds the connection's Layer 2 overlay
|
//! direction — accepted or opened). Holds the connection's Layer 2 overlay
|
||||||
//! (imported ops).
|
//! (imported ops).
|
||||||
//!
|
//!
|
||||||
//! See `docs/architecture/crates/call/call-protocol.md` for the full
|
//! See `docs/architecture/` for the full specification.
|
||||||
//! specification.
|
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
//! Shared dispatch loop for `alknet/call` connections.
|
//! Shared dispatch loop for `alknet/call` connections.
|
||||||
//!
|
//!
|
||||||
//! Both [`CallAdapter`]'s accept path and [`crate::client::CallClient`]'s
|
//! Both [`super::adapter::CallAdapter`]'s accept path and
|
||||||
//! connect path produce a [`CallConnection`] and hand it to the same dispatch
|
//! [`crate::client::CallClient`]'s connect path produce a [`CallConnection`]
|
||||||
//! loop here (ADR-017 §1): the loop reads `EventEnvelope` frames off accepted
|
//! and hand it to the same dispatch loop here (ADR-017 §1): the loop reads
|
||||||
//! bidirectional streams, dispatches `call.requested` events against the
|
//! `EventEnvelope` frames off accepted bidirectional streams, dispatches
|
||||||
//! operation registry, and writes the response back on the same stream. The
|
//! `call.requested` events against the operation registry, and writes the
|
||||||
//! connection-establishment half differs (accept vs dial); the dispatch half
|
//! response back on the same stream. The connection-establishment half
|
||||||
//! is shared.
|
//! differs (accept vs dial); the dispatch half is shared.
|
||||||
//!
|
//!
|
||||||
//! See `docs/architecture/crates/call/call-protocol.md` and
|
//! See `docs/architecture/` for the spec.
|
||||||
//! `docs/architecture/crates/call/client-and-adapters.md` for the spec.
|
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
//! Call protocol: wire format, streams, and the call adapter.
|
//! Call protocol: wire format, streams, and the call adapter.
|
||||||
//!
|
//!
|
||||||
//! Implements `ProtocolHandler` for ALPN `alknet/call` on top of the
|
//! Implements `ProtocolHandler` for ALPN `alknet/call` on top of the
|
||||||
//! operation registry. See `docs/architecture/crates/call/call-protocol.md`
|
//! operation registry. See `docs/architecture/` for the full specification.
|
||||||
//! for the full specification.
|
|
||||||
|
|
||||||
pub mod abort;
|
pub mod abort;
|
||||||
pub mod adapter;
|
pub mod adapter;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
//! Wire format: `EventEnvelope`, `ResponseEnvelope`, `CallError`, and
|
//! Wire format: `EventEnvelope`, `ResponseEnvelope`, `CallError`, and
|
||||||
//! length-prefixed JSON framing.
|
//! length-prefixed JSON framing.
|
||||||
//!
|
//!
|
||||||
//! See `docs/architecture/crates/call/call-protocol.md` for the full
|
//! See `docs/architecture/` for the full specification.
|
||||||
//! specification.
|
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
//! Operation specifications: `OperationSpec`, `OperationType`, `Visibility`,
|
//! Operation specifications: `OperationSpec`, `OperationType`, `Visibility`,
|
||||||
//! `ErrorDefinition`, and `AccessControl`.
|
//! `ErrorDefinition`, and `AccessControl`.
|
||||||
//!
|
//!
|
||||||
//! See `docs/architecture/crates/call/operation-registry.md` for the full
|
//! See `docs/architecture/` for the full specification.
|
||||||
//! specification.
|
|
||||||
|
|
||||||
use crate::core::auth::Identity;
|
use crate::core::auth::Identity;
|
||||||
use crate::core::ownership::OwnershipProvider;
|
use crate::core::ownership::OwnershipProvider;
|
||||||
|
|||||||
Reference in New Issue
Block a user