metrics

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 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 creates a new service for gathering pprof metrics.

func NewPrometheusService

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

NewPrometheusService creates a new service for gathering prometheus metrics.

func (*Service) ShutDown

func (ms *Service) ShutDown()

ShutDown stops the service.

func (*Service) Start

func (ms *Service) Start()

Start runs http service with the exposed endpoint on the configured port.

Jump to

Keyboard shortcuts

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