health

package
v0.0.0-...-d09eed2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPrefix   = ""
	DefaultAddress  = ":8081"
	DefaultPort     = 8081
	DefaultPortName = "health"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check func() error

type Service

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

func New

func New(address string, prefix string, logger *slog.Logger) *Service

func (*Service) AddLivenessCheck

func (s *Service) AddLivenessCheck(name string, check Check)

func (*Service) AddReadinessCheck

func (s *Service) AddReadinessCheck(name string, check Check)

func (*Service) Start

func (s *Service) Start(context.Context) error

func (*Service) Stop

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

Jump to

Keyboard shortcuts

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