healthcheck

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 5 Imported by: 0

README

License

MIT License. See LICENSE for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServicesFromContext

func ServicesFromContext(ctx context.Context) []string

Types

type EmptyPinger

type EmptyPinger struct{}

func (EmptyPinger) Name

func (EmptyPinger) Name() string

func (EmptyPinger) Ping

func (EmptyPinger) Ping(ctx context.Context) error

type Handler

type Handler interface {
	Handle(ctx context.Context, services ...string) error
}

func NewHandler

func NewHandler(name string, pinger Pinger) Handler

type Middleware

type Middleware interface{ Pinger(p Pinger) Pinger }

func IgnoreServiceMiddleware

func IgnoreServiceMiddleware(serviceName string) Middleware

type MiddlewareFunc

type MiddlewareFunc func(ctx context.Context, p Pinger) error

func (MiddlewareFunc) Pinger

func (f MiddlewareFunc) Pinger(p Pinger) Pinger

type Pinger

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

func InlinePinger

func InlinePinger(name string, pf func(ctx context.Context) error) Pinger

func Join

func Join(pingers ...Pinger) Pinger

func Wrap

func Wrap(p Pinger, middlewares ...Middleware) Pinger

Directories

Path Synopsis
Package healthcheckmocks is a generated GoMock package.
Package healthcheckmocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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