Expand description
§Session Storage Abstractions and Implementations
Pluggable session storage backends for MCP servers across deployment scenarios.
Provides the core SessionStorage trait with implementations for InMemory, SQLite, PostgreSQL, and DynamoDB, enabling seamless scaling from development to production.
§Installation
[dependencies]
turul-mcp-session-storage = "0.2"
# Optional features for different backends
turul-mcp-session-storage = { version = "0.2", features = ["sqlite"] }
turul-mcp-session-storage = { version = "0.2", features = ["postgres"] }
turul-mcp-session-storage = { version = "0.2", features = ["dynamodb"] }
Re-exports§
pub use in_memory::InMemoryConfig;
pub use in_memory::InMemoryError;
pub use in_memory::InMemorySessionStorage;
pub use in_memory::InMemoryStats;
Modules§
Structs§
- Session
Info - Core session storage traits and types for pluggable backend implementations Comprehensive session information
- SseEvent
- Core session storage traits and types for pluggable backend implementations SSE event with proper metadata for resumability
Enums§
- Session
Storage Error - Core session storage traits and types for pluggable backend implementations Unified error type for all session storage backends
Traits§
- Session
Storage - Core session storage traits and types for pluggable backend implementations Core trait for session storage backends
- Session
Storage Builder - Core session storage traits and types for pluggable backend implementations Convenience trait for creating session storage instances
- Session
View - Minimal session interface for middleware access
Functions§
- create_
default_ storage - Create a default in-memory session storage instance for development and testing
- create_
memory_ storage - Create an in-memory session storage with custom configuration and cleanup settings
Type Aliases§
- Boxed
Session Storage - Core session storage traits and types for pluggable backend implementations Type alias for boxed session storage trait object with unified error type
- Session
Result - Core session storage traits and types for pluggable backend implementations Result type for session storage operations
- Storage
Result - Convenience type alias for session storage results