monitoring

package
v2.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HealthEndpoint      = "/health"
	PprofIndexEndpoint  = "/debug/pprof"
	EchoShutdownTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

func NewMon

func NewMon(opts ...Option) *Monitor

func (*Monitor) AddHealthChecker

func (m *Monitor) AddHealthChecker(handlers ...health.Checker)

func (*Monitor) GracefulStop

func (m *Monitor) GracefulStop(_ctx context.Context) error

func (*Monitor) Start

func (m *Monitor) Start(ctx context.Context) error

Start is blocking operation

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithAddr

func WithAddr(addr string) Option

func WithChecker

func WithChecker(ch ...health.Checker) Option

func WithDebug

func WithDebug(debug bool) Option

func WithMetricProvider

func WithMetricProvider(provider metric.MeterProvider) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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