sentinel_agent_api_deprecation/lib.rs
1//! Sentinel API Deprecation Agent
2//!
3//! Manages API lifecycle by adding deprecation and sunset headers, tracking
4//! usage of deprecated endpoints, and handling migration through redirects.
5//!
6//! # Features
7//!
8//! - **Sunset Headers**: RFC 8594 compliant Sunset headers
9//! - **Deprecation Headers**: Standard deprecation warnings
10//! - **Usage Tracking**: Prometheus metrics for deprecated endpoint usage
11//! - **Automatic Redirects**: Redirect deprecated endpoints to replacements
12//! - **Gradual Migration**: Configure different actions per endpoint
13//!
14//! # Example Configuration
15//!
16//! ```yaml
17//! endpoints:
18//! - id: legacy-users-api
19//! path: /api/v1/users
20//! methods: [GET, POST]
21//! status: deprecated
22//! sunset_at: "2025-06-01T00:00:00Z"
23//! replacement:
24//! path: /api/v2/users
25//! documentation_url: https://docs.example.com/migration
26//! action:
27//! type: warn
28//! ```
29
30pub mod agent;
31pub mod config;
32pub mod headers;
33pub mod metrics;
34
35pub use agent::ApiDeprecationAgent;
36pub use config::ApiDeprecationConfig;