restful

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: 15 Imported by: 1

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(req *restful.Request, rsp *restful.Response)

func (*Handler) MetricMiddleware

func (h *Handler) MetricMiddleware(req *restful.Request, rsp *restful.Response, chain *restful.FilterChain)

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