xds-core 0.1.0

Core types, traits, and error handling for xDS control plane
Documentation

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 mapping
  • [ResourceVersion] - Version tracking for xDS resources
  • [NodeHash] - Efficient node identification using FNV-1a hashing
  • [Resource] - Trait for implementing custom xDS resource types
  • [TypeUrl] - 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());