Documentation
¶
Overview ¶
Package proxy provides dynamic routing capabilities for HTTP servers.
This file contains the implementation of a dynamic router that allows changing the HTTP handler at runtime in a thread-safe manner. It is particularly useful for proxy servers that need to update their routing logic wihtout restarting the server.
Index ¶
Constants ¶
const ( // Health check names HealthCheckDatabase = "database" HealthCheckModelRegistry = "model-registry" HealthCheckMeta = "meta" // Health check statuses StatusPass = "pass" StatusFail = "fail" )
Variables ¶
This section is empty.
Functions ¶
func GeneralReadinessHandler ¶ added in v0.2.22
func GeneralReadinessHandler(additionalCheckers ...HealthChecker) http.Handler
GeneralReadinessHandler creates a general readiness handler with configurable health checks
func NewDynamicRouter ¶
func NewDynamicRouter() *dynamicRouter
Types ¶
type DatabaseHealthChecker ¶ added in v0.2.22
type DatabaseHealthChecker struct {
}
DatabaseHealthChecker checks database connectivity and schema state
func NewDatabaseHealthChecker ¶ added in v0.2.22
func NewDatabaseHealthChecker() *DatabaseHealthChecker
func (*DatabaseHealthChecker) Check ¶ added in v0.2.22
func (d *DatabaseHealthChecker) Check() HealthCheck
type HealthCheck ¶ added in v0.2.22
HealthCheck represents a single health check
type HealthChecker ¶ added in v0.2.22
type HealthChecker interface {
Check() HealthCheck
}
HealthChecker defines the interface for health checks
type HealthStatus ¶ added in v0.2.22
type HealthStatus struct {
Status string `json:"status"`
Checks map[string]HealthCheck `json:"checks"`
}
HealthStatus represents the overall health status
type ModelRegistryHealthChecker ¶ added in v0.2.22
type ModelRegistryHealthChecker struct {
// contains filtered or unexported fields
}
ModelRegistryHealthChecker checks model registry service health
func NewModelRegistryHealthChecker ¶ added in v0.2.22
func NewModelRegistryHealthChecker(service api.ModelRegistryApi) *ModelRegistryHealthChecker
func (*ModelRegistryHealthChecker) Check ¶ added in v0.2.22
func (m *ModelRegistryHealthChecker) Check() HealthCheck