prometheusmetrics

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(s *PrometheusMetrics)

Option PrometheusMetrics option

func WithAddr

func WithAddr(addr string) Option

WithAddr with server and port option

func WithLogger

func WithLogger(logger *zap.Logger) Option

WithLogger with logger option

func WithPath

func WithPath(path string) Option

WithPath with path option

type PrometheusMetrics

type PrometheusMetrics struct {
	http.Server

	Path   string
	Logger *zap.Logger
}

PrometheusMetrics wraps the Service with additional http and app lifecycle handling

func New

func New(options ...Option) *PrometheusMetrics

New create new metrics PrometheusMetrics

func (*PrometheusMetrics) Handle

func (s *PrometheusMetrics) Handle(next http.Handler) http.Handler

Handle prometheus http middleware handler

func (*PrometheusMetrics) Startup

func (s *PrometheusMetrics) Startup(_ context.Context) error

Startup prometheus metrics server

Jump to

Keyboard shortcuts

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