metrics

package
v0.3.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default() definition.Middleware

Default returns a metric Middleware under the namespace "nirvana" for restful descriptor.

Once called, the namespace is set and can not be changed. Future attempt to build more Middleware will result in ones with the same namespace as the first one.

Unlike the metrics plugin which takes care of everything, you must call Descriptor() to build a Descriptor and configure it to a server yourself.

func Descriptor

func Descriptor(path string) definition.Descriptor

Descriptor returns a descriptor for the API; it must be configured to a server in order to serve the metric API.

func RPC

func RPC(options *metrics.Options) definition.Middleware

RPC returns a metrics Middleware for RCP Descriptors built from the given options.

Once called, the namespace is set and can not be changed. Future attempt to build more Middleware will result in ones with the same namespace as the first one.

Unlike the metrics plugin which takes care of everything, you must call Descriptor() to build a Descriptor and configure it to a server yourself.

func RPCDescriptor

func RPCDescriptor(path string) definition.RPCDescriptor

RPCDescriptor returns a rpc descriptor for the API; it must be configured to a server in order to serve the metric API.

func Restful

func Restful(options *metrics.Options) definition.Middleware

Restful returns a metrics Middleware for Restful Descriptors built from the given options.

Once called, the namespace is set and can not be changed. Future attempt to build more Middleware will result in ones with the same namespace as the first one.

Unlike the metrics plugin which takes care of everything, you must call Descriptor() to build a Descriptor and configure it to a server yourself.

Types

This section is empty.

Jump to

Keyboard shortcuts

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