metric

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Default       = New()
	Namespace     = field.New(false, name, "namespace", "metric namespace", "")
	Subsystem     = field.New(false, name, "subsystem", "metric subsystem", "")
	PushEnabled   = field.New(false, name, "pushEnabled", "enable push", false)
	PushTargetURL = field.New(false, name, "pushTargetURL", "pushgateway url", "")
	PushInterval  = field.New(false, name, "pushInterval", "push to a pushgateway interval, millisecond", time.Second*3)
)

Functions

This section is empty.

Types

type Metric

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

Metric config

func New

func New(optFunc ...OptionFunc) *Metric

New a metrics

func (*Metric) Metrics

func (m *Metric) Metrics() http.Handler

Metric metrics http

func (*Metric) Name

func (m *Metric) Name() string

Name config name

func (*Metric) Serve

func (m *Metric) Serve(context.Context) error

Serve start serve

func (*Metric) Shutdown

func (m *Metric) Shutdown(context.Context) error

Shutdown close clients when Shutdown

type OptionFunc

type OptionFunc func(*Options)

type Options

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

Jump to

Keyboard shortcuts

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