| 37 | ) |
| 38 | |
| 39 | type Server struct { |
| 40 | cfg *config.Config |
| 41 | policy interfaces.PolicyEngine |
| 42 | router interfaces.Router |
| 43 | reliability interfaces.ReliabilityManager |
| 44 | sloEngine interfaces.SLOEngine |
| 45 | telemetry interfaces.TelemetryExporter |
| 46 | adapters map[string]interfaces.BackendAdapter |
| 47 | ledger requests.Store |
| 48 | retrieval map[string]interfaces.RetrievalAdapter |
| 49 | rerank interfaces.RerankAdapter |
| 50 | |
| 51 | healthMu sync.Mutex |
| 52 | healthSnapshot map[string]bool |
| 53 | healthAt time.Time |
| 54 | healthFlight singleflight.Group |
| 55 | |
| 56 | inferInflight atomic.Int32 |
| 57 | |
| 58 | promReg *prometheus.Registry |
| 59 | inferReqCounter prometheus.Counter |
| 60 | httpReqCounter *prometheus.CounterVec |
| 61 | |
| 62 | timeoutSpikeMu sync.Mutex |
| 63 | timeoutSpikeWin time.Time |
| 64 | timeoutSpikeCnt int |
| 65 | } |
| 66 | |
| 67 | // minTimeoutsPerMinuteForSpike is the rolling 1-minute threshold for scaling_signals.timeout_spike. |
| 68 | const minTimeoutsPerMinuteForSpike = 3 |
nothing calls this directly
no outgoing calls
no test coverage detected