Documentation ¶
Index ¶
- func New(opts ...Option) gin.HandlerFunc
- type BloomFilter
- type Option
- func WithDuration(duration []float64) Option
- func WithEndpointLabelMappingFn(endpointLabelMappingFn RequestLabelMappingFn) Option
- func WithExcludeRegexEndpoint(excludeRegexEndpoint []string) Option
- func WithExcludeRegexMethod(excludeRegexMethod []string) Option
- func WithExcludeRegexStatus(excludeRegexStatus []string) Option
- func WithHandlerUrl(handlerUrl string) Option
- func WithName(name string) Option
- func WithNamespace(namespace string) Option
- func WithPromHandler(router *gin.Engine) Option
- func WithSlowTime(slowTime float64) Option
- type RequestLabelMappingFn
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
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 ¶
WithDuration set duration function 0.1, 0.3, 1.2, 5
func WithEndpointLabelMappingFn ¶
func WithEndpointLabelMappingFn(endpointLabelMappingFn RequestLabelMappingFn) Option
WithEndpointLabelMappingFn set endpointLabelMappingFn function
func WithExcludeRegexEndpoint ¶
WithExcludeRegexEndpoint set excludeRegexEndpoint function regexp
func WithExcludeRegexMethod ¶
WithExcludeRegexMethod set excludeRegexMethod function regexp
func WithExcludeRegexStatus ¶
WithExcludeRegexStatus set excludeRegexStatus function regexp
func WithHandlerUrl ¶
WithHandlerUrl set handlerUrl function
func WithNamespace ¶
WithNamespace set namespace function
func WithPromHandler ¶
WithPromHandler set router function
func WithSlowTime ¶ added in v0.2.8
WithSlowTime set slowTime function 1
type RequestLabelMappingFn ¶
Click to show internal directories.
Click to hide internal directories.