llm_cost_ops_api/
lib.rs

1//! LLM-CostOps API - REST API and data ingestion endpoints
2//!
3//! This crate provides the HTTP API server and data ingestion functionality
4//! for LLM Cost Operations.
5
6pub mod api;
7pub mod ingestion;
8
9// Re-export commonly used types from api module
10pub use api::{
11    // Error types
12    ApiError, ApiResult,
13    // Server
14    ApiServer, ApiServerConfig, create_api_router,
15    // Types
16    ApiVersion, ApiResponse, PaginationParams, PaginatedResponse,
17    // Constants
18    API_VERSION, API_PREFIX,
19};
20
21// Re-export commonly used types from ingestion module
22pub use ingestion::{
23    // Handler
24    DefaultIngestionHandler, StorageAdapter,
25    IngestionHandler, IngestionStorage, PayloadValidator,
26    // Models
27    BatchIngestionRequest, IngestionConfig, IngestionError, IngestionResponse, IngestionStatus,
28    StreamEventType, StreamMessage, UsageWebhookPayload,
29    // Rate limiting
30    RateLimiter, RateLimitConfig, RateLimitUsage,
31    InMemoryRateLimiter, NoOpRateLimiter, RedisRateLimiter,
32    RateLimitMiddleware, rate_limit_middleware,
33    // Streaming
34    NatsConsumer, RedisConsumer,
35    RecordBuffer,
36    // Webhook
37    create_webhook_router, create_webhook_router_with_rate_limit,
38    start_webhook_server, WebhookServerState,
39};
40
41/// Library version
42pub const VERSION: &str = env!("CARGO_PKG_VERSION");