healthcheck

package
v0.7.21 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFunc

type ClientFunc func(context.Context) (types.ConnectorClient, error)

ClientFunc is a function that returns a ConnectorClient.

type Config

type Config struct {
	Enabled     bool
	Port        int
	BindAddress string
}

Config holds the configuration for the health check server.

type HealthResponse

type HealthResponse struct {
	Status    string            `json:"status"`
	Timestamp string            `json:"timestamp"`
	Details   map[string]string `json:"details,omitempty"`
}

HealthResponse represents the JSON response for health check endpoints.

type Server

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

Server manages the HTTP health check server lifecycle.

func NewServer

func NewServer(cfg Config, clientFunc ClientFunc) *Server

NewServer creates a new health check server.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start starts the HTTP health check server.

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop gracefully shuts down the health check server.

Jump to

Keyboard shortcuts

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