Module enhanced_registry

Module enhanced_registry 

Source
Expand description

An advanced handler registry with metrics and enhanced features. Advanced registry with MCP protocol handler support and observability.

This registry extends the crate::registry::Registry base with:

  • MCP protocol handlers (elicitation, completion, resource templates, ping)
  • Handler call statistics (invocation count, duration, errors)
  • Capability tracking per handler
  • Thread-safe concurrent access via DashMap

§When to Use This Registry

Use EnhancedRegistry when you need:

  • MCP protocol handler registration (elicitation, completion, etc.)
  • Observability into handler usage patterns
  • Production-grade monitoring and debugging
  • Capability discovery per registered handler

§Comparison with Base Registry

Featurecrate::registry::RegistryEnhancedRegistry
Component storage✅ (via base)
MCP handlers
Statistics
Observability
OverheadZeroMinimal (atomic counters)
  • crate::registry::Registry - Base registry (used internally by this one)
  • turbomcp_server::registry::HandlerRegistry - Server-specific DashMap-based registry

Structs§

EnhancedRegistry
Enhanced registry with handler support
HandlerStats
Statistics about registered handlers