metrics

package
v0.0.0-...-f94ef0f Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled bool   `yaml:"Enabled"`
	Address string `yaml:"Address"`
	Port    string `yaml:"Port"`
}

Config config used for monitoring.

type PprofService

type PprofService Service

PprofService https://golang.org/pkg/net/http/pprof/.

type PrometheusService

type PrometheusService Service

PrometheusService https://prometheus.io/docs/guides/go-application.

type Service

type Service struct {
	*http.Server
	// contains filtered or unexported fields
}

Service serves metrics.

func NewPprofService

func NewPprofService(cfg Config, log *zap.Logger) *Service

NewPprofService created new service for gathering pprof metrics.

func NewPrometheusService

func NewPrometheusService(cfg Config, log *zap.Logger) *Service

NewPrometheusService creates new service for gathering prometheus metrics.

func (*Service) ShutDown

func (ms *Service) ShutDown()

ShutDown stops service.

func (*Service) Start

func (ms *Service) Start()

Start runs http service with exposed endpoint on configured port.

Jump to

Keyboard shortcuts

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