Documentation ¶
Index ¶
- func DefaultClientMiddlewares(logHelper *log.Helper) []middleware.Middleware
- func DefaultServerMiddlewares(logHelper *log.Helper) []middleware.Middleware
- func NewCORS() func(stdhttp.Handler) stdhttp.Handler
- func NewWhiteListMatcher(whiteList map[string]struct{}) selector.MatchFunc
- func RecoveryHandler() recovery.HandlerFunc
- func RequestAndResponseHeader() middleware.Middleware
- func SetTracer(serviceNameKey string, opts ...TracerOption) error
- func SetTracerProvider(serviceNameKey string, exporter *otlptrace.Exporter) error
- func Validator() middleware.Middleware
- type TracerExporterType
- type TracerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientMiddlewares ¶
func DefaultClientMiddlewares(logHelper *log.Helper) []middleware.Middleware
DefaultClientMiddlewares 中间件
func DefaultServerMiddlewares ¶
func DefaultServerMiddlewares(logHelper *log.Helper) []middleware.Middleware
DefaultServerMiddlewares 中间件
func NewWhiteListMatcher ¶
NewWhiteListMatcher 路由白名单
func RequestAndResponseHeader ¶
func RequestAndResponseHeader() middleware.Middleware
RequestAndResponseHeader 请求头 and 响应头
func SetTracer ¶
func SetTracer(serviceNameKey string, opts ...TracerOption) error
SetTracer set trace provider serviceNameKey == apputil.ID(appConfig)
func SetTracerProvider ¶
SetTracerProvider set trace provider serviceNameKey == apputil.ID(appConfig)
Types ¶
type TracerExporterType ¶
type TracerExporterType string
const ( TracerExporterTypeUnknown TracerExporterType = "unknown" TracerExporterTypeJaeger TracerExporterType = "jaeger" )
type TracerOption ¶
type TracerOption func(*tracerOptions)
TracerOption is config option.
func WithTracerJaegerExporter ¶
func WithTracerJaegerExporter(exporter *otlptrace.Exporter) TracerOption
WithTracerJaegerExporter with config writer.
Click to show internal directories.
Click to hide internal directories.