velo_ext/lib.rs
1// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2// SPDX-License-Identifier: Apache-2.0
3
4#![deny(missing_docs)]
5
6//! Extension trait surface for Velo.
7//!
8//! Out-of-tree implementors of [`Transport`](transport::Transport),
9//! [`FrameTransport`](streaming::FrameTransport), and
10//! [`PeerDiscovery`](discovery::PeerDiscovery) depend on this crate. It
11//! contains the trait definitions and the value/error types that appear in
12//! their signatures — nothing more. Anyone who only *uses* Velo should depend
13//! on the `velo` crate; only plugin authors should reach for `velo-ext`.
14//!
15//! ## Stability
16//!
17//! This crate is the contract that downstream impls compile against. New trait
18//! methods land with default impls; signature changes require a deliberate
19//! version bump coordinated with `velo`. See `Cargo.toml` for the full policy.
20
21pub mod admission;
22pub mod discovery;
23pub mod id;
24pub mod observability;
25pub mod streaming;
26pub mod transport;
27
28// Convenience re-exports at the crate root for the most-used items. Plugin
29// authors typically write `use velo_ext::Transport;` or `use velo_ext::WorkerId;`.
30pub use admission::{AdmissionError, AdmissionGate, AdmissionState, SendAdmission, SendOutcome};
31pub use discovery::{
32 PeerDiscovery, PeerRegistrationGuard, ServiceDiscovery, ServiceEvent, ServiceRegistrationGuard,
33};
34pub use id::{InstanceId, PeerInfo, TransportKey, WorkerAddress, WorkerAddressError, WorkerId};
35pub use observability::{Direction, TransportObservability, TransportRejection};
36pub use streaming::FrameTransport;
37pub use transport::{
38 AdmitOutcome, DataStreams, HealthCheckError, InFlightGuard, InboundMessage, MessageType,
39 ShutdownPolicy, ShutdownState, Transport, TransportAdapter, TransportError,
40 TransportErrorHandler, make_channels,
41};