proxy

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

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

View Source
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

type HealthCheck added in v0.2.22

type HealthCheck struct {
	Name    string
	Status  string
	Message string
	Details map[string]interface{}
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL