prom

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) gin.HandlerFunc

New returns a gin.HandlerFunc for exporting some Web metrics

Types

type Option

type Option func(*config)

Option for queue system

func WithDuration

func WithDuration(duration []float64) Option

WithDuration set duration function

func WithEndpointLabelMappingFn

func WithEndpointLabelMappingFn(endpointLabelMappingFn RequestLabelMappingFn) Option

WithEndpointLabelMappingFn set endpointLabelMappingFn function

func WithExcludeRegexEndpoint

func WithExcludeRegexEndpoint(excludeRegexEndpoint []string) Option

WithExcludeRegexEndpoint set excludeRegexEndpoint function regexp

func WithExcludeRegexMethod

func WithExcludeRegexMethod(excludeRegexMethod []string) Option

WithExcludeRegexMethod set excludeRegexMethod function regexp

func WithExcludeRegexStatus

func WithExcludeRegexStatus(excludeRegexStatus []string) Option

WithExcludeRegexStatus set excludeRegexStatus function regexp

func WithHandlerUrl

func WithHandlerUrl(handlerUrl string) Option

WithHandlerUrl set handlerUrl function

func WithNamespace

func WithNamespace(namespace string) Option

WithNamespace set namespace function

func WithPromHandler

func WithPromHandler(router *gin.Engine) Option

WithPromHandler set router function

type RequestLabelMappingFn

type RequestLabelMappingFn func(c *gin.Context) string

Jump to

Keyboard shortcuts

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