proxy

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HealthCheckDatabase = "database"
	HealthCheckMeta     = "meta"

	StatusPass = "pass"
	StatusFail = "fail"
)

Variables

This section is empty.

Functions

func GeneralReadinessHandler

func GeneralReadinessHandler(additionalCheckers ...HealthChecker) http.Handler

GeneralReadinessHandler creates a general readiness handler with configurable health checks

Types

type DatabaseHealthChecker

type DatabaseHealthChecker struct {
}

DatabaseHealthChecker checks database connectivity and schema state

func NewDatabaseHealthChecker

func NewDatabaseHealthChecker() *DatabaseHealthChecker

func (*DatabaseHealthChecker) Check

type DynamicRouter

type DynamicRouter struct {
	// contains filtered or unexported fields
}

func NewDynamicRouter

func NewDynamicRouter() *DynamicRouter

func (*DynamicRouter) ServeHTTP

func (d *DynamicRouter) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*DynamicRouter) SetRouter

func (d *DynamicRouter) SetRouter(router http.Handler)

type HealthCheck

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

HealthCheck represents a single health check

type HealthChecker

type HealthChecker interface {
	Check() HealthCheck
}

HealthChecker defines the interface for health checks

type HealthStatus

type HealthStatus struct {
	Status string                 `json:"status"`
	Checks map[string]HealthCheck `json:"checks"`
}

HealthStatus represents the overall health status

Jump to

Keyboard shortcuts

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