Expand description
§xds-core
Core types, traits, and error handling for xDS control plane implementations.
This crate provides the foundational types used across all other xDS crates:
XdsError- Comprehensive error type with proper gRPC status code mappingResourceVersion- Version tracking for xDS resourcesNodeHash- Efficient node identification using FNV-1a hashingResource- Trait for implementing custom xDS resource typesTypeUrl- Type URL handling and constants
§Example
use xds_core::{XdsError, NodeHash, ResourceVersion};
// Create a node hash from a node ID
let node = NodeHash::from_id("my-envoy-node");
// Create a resource version
let version = ResourceVersion::new("v1");
// Check if version is empty (initial state)
assert!(!version.is_empty());Structs§
- Node
Hash - Hash-based node identifier for efficient lookup.
- Resource
Registry - Registry for resource types.
- Resource
Type Info - Information about a registered resource type.
- Resource
Version - Version identifier for xDS resources.
- Shared
Resource Registry - Thread-safe registry for resource types.
- TypeUrl
- Type URL wrapper for xDS resource types.
Enums§
- XdsError
- Comprehensive error type for xDS operations.
Traits§
- Resource
- Trait for xDS resources.
Type Aliases§
- BoxResource
- Type alias for a boxed resource. Uses Arc for efficient cloning and sharing across snapshots.
- Result
- Result type alias using
XdsError. - XdsResult
- Alias for Result to maintain backward compatibility.