health

package
v0.4.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(mux *http.ServeMux, service *Service)

Types

type Controller

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

func NewController

func NewController(service *Service) *Controller

func (*Controller) Handle

func (c *Controller) Handle(w http.ResponseWriter, r *http.Request)

type Pinger

type Pinger interface {
	Ping(context.Context) error
}

type Response

type Response struct {
	Status   string `json:"status"`
	Database string `json:"database"`
}

type Service

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

func NewService

func NewService(pinger Pinger, timeout time.Duration) *Service

func (*Service) Check

func (s *Service) Check(ctx context.Context) (Response, bool)

Jump to

Keyboard shortcuts

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