Documentation ¶
Index ¶
- Variables
- func GetStartTime(ctx context.Context) time.Time
- func HeaderCarrierInterceptor() (resty.RequestMiddleware, resty.ResponseMiddleware, resty.ErrorHook)
- func LogInterceptor(cfg *http_client_config.Config) (resty.RequestMiddleware, resty.ResponseMiddleware, resty.ErrorHook)
- func MetricInterceptor(name, addr string, rewriter http_client_config.MetricPathRewriter) (resty.RequestMiddleware, resty.ResponseMiddleware, resty.ErrorHook)
- func SetStartTimeInterceptor() (resty.RequestMiddleware, resty.ResponseMiddleware, resty.ErrorHook)
- func TraceInterceptor(name string, cfg *http_client_config.Config) (resty.RequestMiddleware, resty.ResponseMiddleware, resty.ErrorHook)deprecated
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ClientHandleCounter ... ClientHandleCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: "", Name: "http_client_handle_total", }, []string{"name", "method", "path", "peer", "code"}) // ClientHandleHistogram ... ClientHandleHistogram = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "", Name: "http_client_handle_seconds", }, []string{"name", "method", "path", "peer"}) )
Functions ¶
func HeaderCarrierInterceptor ¶
func HeaderCarrierInterceptor() (resty.RequestMiddleware, resty.ResponseMiddleware, resty.ErrorHook)
多个服务间透传参数
func LogInterceptor ¶
func LogInterceptor(cfg *http_client_config.Config) (resty.RequestMiddleware, resty.ResponseMiddleware, resty.ErrorHook)
func MetricInterceptor ¶
func MetricInterceptor(name, addr string, rewriter http_client_config.MetricPathRewriter) (resty.RequestMiddleware, resty.ResponseMiddleware, resty.ErrorHook)
func SetStartTimeInterceptor ¶
func SetStartTimeInterceptor() (resty.RequestMiddleware, resty.ResponseMiddleware, resty.ErrorHook)
func TraceInterceptor
deprecated
func TraceInterceptor(name string, cfg *http_client_config.Config) (resty.RequestMiddleware, resty.ResponseMiddleware, resty.ErrorHook)
Deprecated: use otel http transport
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.