metrics

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server holds the echo server, registry and config to provide metrics.

func New

func New(metricsConfig *config.Metrics, logger *zerolog.Logger) *Server

New creates a new metrics server.

func (*Server) GetMiddlewareConfig

func (s *Server) GetMiddlewareConfig() echoprometheus.MiddlewareConfig

GetMiddlewareConfig provides the middle ware for echo to supply metrics.

func (*Server) Shutdown

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

Shutdown gracefully stops the metrics server.

func (*Server) Start

func (s *Server) Start() error

Start checks the config and starts the server if configured.

Jump to

Keyboard shortcuts

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