gin

package
v0.0.0-...-5ba8ac2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const AppName = "metrics"

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	ioc.ObjectImpl

	RequestTotalName             string                  `json:"requestTotalName" yaml:"requestTotalName"`         // Counter 指标名称
	RequestHistogramName         string                  `json:"requestHistogramName" yaml:"requestHistogramName"` // Histogram 指标名称
	HttpRequestTotal             metric.Int64Counter     // 指标值
	HttpRequestDurationHistogram metric.Float64Histogram // 指标值
	// contains filtered or unexported fields
}

func (*Handler) Close

func (h *Handler) Close(ctx context.Context) error

func (*Handler) Init

func (h *Handler) Init()

func (*Handler) MetricHandler

func (h *Handler) MetricHandler(ctx *gin.Context)

func (*Handler) MetricMiddleware

func (h *Handler) MetricMiddleware(ctx *gin.Context)

MetricMiddleware 指标中间件

func (*Handler) MetricRegistry

func (h *Handler) MetricRegistry(meter metric.Meter)

MetricRegistry 创建指标

func (*Handler) Name

func (h *Handler) Name() string

func (*Handler) Priority

func (h *Handler) Priority() int

Jump to

Keyboard shortcuts

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