1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Schema Registry
//!
//! Provides versioned message schema storage and retrieval.
//! Enables schema evolution and documentation of message types.
//!
//! # Architecture
//!
//! - Stores schemas in Redis with versioning
//! - Each schema has a name and version number
//! - Schemas stored as JSON Schema format
//! - Supports listing all schemas and retrieving specific versions
//!
//! # Example
//!
//! ```rust
//! use mecha10::prelude::*;
//! use mecha10::schema::{SchemaRegistryExt, MessageSchema};
//!
//! # async fn example(ctx: &Context) -> Result<()> {
//! // Register a schema
//! let schema = MessageSchema::new("LaserScan", 1)
//! .with_description("2D laser scan data")
//! .with_field("timestamp", "integer", true)
//! .with_field("ranges", "array", true)
//! .with_field("intensities", "array", false);
//!
//! ctx.register_schema(&schema).await?;
//!
//! // Get latest schema
//! let schema = ctx.get_latest_schema("LaserScan").await?;
//!
//! // Get specific version
//! let schema_v1 = ctx.get_schema("LaserScan", 1).await?;
//!
//! // List all schemas
//! let all_schemas = ctx.list_schemas().await?;
//!
//! # Ok(())
//! # }
//! ```
//!
//! This module is organized into:
//! - `types`: The `MessageSchema`/`SchemaField` data model
//! - `registry`: The `SchemaRegistryExt` trait (CRUD against the Redis-backed registry)
//! - `registry_impl`: The `Context` implementation of `SchemaRegistryExt`
//! - `compatibility`: Schema evolution and compatibility checking
//! - `versioning`: Versioned schema operations built on top of the registry
pub use ;
pub use SchemaRegistryExt;
pub use ;
pub use ;
/// Get current Unix timestamp in seconds