Expand description
Sentinel Proxy Core Implementation
This module contains the main SentinelProxy struct and its implementation, split across several submodules for maintainability:
context: Request context maintained throughout the request lifecyclehandlers: Helper methods for handling different route typeshttp_trait: ProxyHttp trait implementation for Pingora
Structs§
- Fallback
Decision - Decision to fall back to an alternative upstream.
- Fallback
Evaluator - Evaluates fallback conditions and selects alternative upstreams.
- Fallback
Metrics - Fallback routing metrics collector.
- Model
Routing Metrics - Model routing metrics collector.
- Model
Routing Result - Result of model-based routing lookup.
- Request
Context - Request context maintained throughout the request lifecycle.
- Sentinel
Proxy - Main proxy service implementing Pingora’s ProxyHttp trait
Enums§
- Fallback
Reason - Reason why fallback routing was triggered
Functions§
- extract_
model_ from_ headers - Extract model name from request headers.
- find_
upstream_ for_ model - Find the upstream for a given model name.
- get_
fallback_ metrics - Get or initialize the global fallback metrics.
- get_
model_ routing_ metrics - Get or initialize the global model routing metrics.
- init_
fallback_ metrics - Initialize the global fallback metrics. Returns Ok if already initialized or initialization succeeds.
- init_
model_ routing_ metrics - Initialize the global model routing metrics. Returns Ok if already initialized or initialization succeeds.