Versions in this module Expand all Collapse all v0 v0.1.0 Jan 5, 2026 Changes in this version + func ListenAndServe(addr string, handler http.Handler) error + func NewHealthMux(health *HealthChecker, provider *Provider) *http.ServeMux + type BackendMetrics struct + func NewBackendMetrics(m *Metrics) *BackendMetrics + func (b *BackendMetrics) IncCacheHit() + func (b *BackendMetrics) IncCacheMiss() + func (b *BackendMetrics) IncStoreError() + func (b *BackendMetrics) IncStoreSuccess() + func (b *BackendMetrics) ObserveStoreDuration(d time.Duration) + func (b *BackendMetrics) SetQueueDepth(n int) + type CommonChecks struct + func (CommonChecks) DatabaseCheck(pingFunc func() error) HealthCheck + func (CommonChecks) KafkaCheck(pingFunc func() error) HealthCheck + func (CommonChecks) RedisCheck(pingFunc func() error) HealthCheck + type Config struct + EnablePrometheus bool + ServiceName string + ServiceVersion string + func DefaultConfig() *Config + type HealthCheck func() error + type HealthChecker struct + func NewHealthChecker() *HealthChecker + func (h *HealthChecker) Handler() http.Handler + func (h *HealthChecker) IsReady() bool + func (h *HealthChecker) LivenessHandler() http.Handler + func (h *HealthChecker) ReadinessHandler() http.Handler + func (h *HealthChecker) RegisterCheck(name string, check HealthCheck) + func (h *HealthChecker) SetReady(ready bool) + type HealthStatus struct + Checks map[string]string + Status string + Timestamp string + Uptime string + type Metrics struct + ActiveConnections metric.Int64UpDownCounter + ActiveRequests metric.Int64UpDownCounter + CertsCacheHits metric.Int64Counter + CertsCacheMiss metric.Int64Counter + CertsGenerated metric.Int64Counter + RequestDuration metric.Float64Histogram + RequestsTotal metric.Int64Counter + ResponseSize metric.Int64Histogram + TrafficQueueDepth metric.Int64ObservableGauge + TrafficStoreErrors metric.Int64Counter + TrafficStored metric.Int64Counter + func NewMetrics(meterProvider metric.MeterProvider) (*Metrics, error) + func (m *Metrics) ConnectionClosed(ctx context.Context) + func (m *Metrics) ConnectionOpened(ctx context.Context) + func (m *Metrics) MetricsMiddleware(next http.Handler) http.Handler + func (m *Metrics) RecordCertCacheHit(ctx context.Context) + func (m *Metrics) RecordCertCacheMiss(ctx context.Context) + func (m *Metrics) RecordCertGenerated(ctx context.Context, host string) + func (m *Metrics) RecordRequest(ctx context.Context, method, host string, statusCode int, ...) + func (m *Metrics) RecordTrafficStoreError(ctx context.Context) + func (m *Metrics) RecordTrafficStored(ctx context.Context) + func (m *Metrics) RegisterQueueDepthCallback(meterProvider metric.MeterProvider, fn func() int64) error + func (m *Metrics) RequestEnd(ctx context.Context) + func (m *Metrics) RequestStart(ctx context.Context) + type Provider struct + MeterProvider *sdkmetric.MeterProvider + Metrics *Metrics + func NewProvider(cfg *Config) (*Provider, error) + func (p *Provider) PrometheusHandler() http.Handler + func (p *Provider) Shutdown(ctx context.Context) error