server

package
v0.0.0-...-bb37284 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const EnvLogLevel = "LOG_LEVEL"

Variables

This section is empty.

Functions

func Run

func Run(f func(ctx context.Context, log *zap.Logger) error)

Run f until interrupt.

Types

type Config

type Config struct {
	Addr string // address for metrics server, optional
	Name string // default name of the service, optional
}

Config for metrics.

type Metrics

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

Metrics wraps application metrics and providers.

func NewMetrics

func NewMetrics(log *zap.Logger, cfg Config) (*Metrics, error)

NewMetrics returns new Metrics.

func (*Metrics) MeterProvider

func (m *Metrics) MeterProvider() metric.MeterProvider

func (*Metrics) Run

func (m *Metrics) Run(ctx context.Context) error

func (*Metrics) Shutdown

func (m *Metrics) Shutdown(ctx context.Context) error

func (*Metrics) TracerProvider

func (m *Metrics) TracerProvider() trace.TracerProvider

Jump to

Keyboard shortcuts

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