prom

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 8 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 BloomFilter added in v0.2.8

type BloomFilter struct {
	Set   *bitset.BitSet
	Funks [6]simpleHash
}

func NewBloomFilter added in v0.2.8

func NewBloomFilter() *BloomFilter

func (*BloomFilter) Add added in v0.2.8

func (bf *BloomFilter) Add(value string)

func (*BloomFilter) Contains added in v0.2.8

func (bf *BloomFilter) Contains(value string) bool

type Option

type Option func(*config)

Option for queue system

func WithDuration

func WithDuration(duration []float64) Option

WithDuration set duration function 0.1, 0.3, 1.2, 5

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 WithName added in v0.2.7

func WithName(name string) Option

WithName set name function

func WithNamespace

func WithNamespace(namespace string) Option

WithNamespace set namespace function

func WithPromHandler

func WithPromHandler(router *gin.Engine) Option

WithPromHandler set router function

func WithSlowTime added in v0.2.8

func WithSlowTime(slowTime float64) Option

WithSlowTime set slowTime function 1

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