metrics

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2018 License: Apache-2.0 Imports: 9 Imported by: 22

Documentation

Index

Constants

View Source
const ExternalConfigName = "metrics"

ExternalConfigName is the external config name of metrics.

Variables

This section is empty.

Functions

func Default

func Default() nirvana.Configurer

Default Configurer does nothing but ensure default config was set.

func Disable

func Disable() nirvana.Configurer

Disable returns a configurer to disable metrics.

func Namespace

func Namespace(ns string) nirvana.Configurer

Namespace returns a configure to set metrics namespace.

func Path

func Path(path string) nirvana.Configurer

Path returns a configurer to set metrics path.

Types

type Option

type Option struct {
	// Namespace is metrics namespace.
	Namespace string `desc:"Metrics namespace"`
	// Path is metrics path.
	Path string `desc:"Metrics path"`
}

Option contains basic configurations of metrics.

func (*Option) Configure

func (p *Option) Configure(cfg *nirvana.Config) error

Configure configures nirvana config via current options.

func (*Option) Name

func (p *Option) Name() string

Name returns plugin name.

Jump to

Keyboard shortcuts

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