fasthttp_routing

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GetSwContext = func(rCtx *routing.Context) context.Context {
		if swContext, ok := rCtx.Get(swCtxKey).(context.Context); ok && swContext != nil {
			return swContext
		}
		return context.Background()
	}
	GetOperationName = func(rCtx *routing.Context) string {
		return fmt.Sprintf("%s:%s", rCtx.Method(), rCtx.Path())
	}
	SetSwContext = func(rCtx *routing.Context, spanCtx context.Context) {
		rCtx.Set(swCtxKey, spanCtx)
	}
)

Functions

func NewMiddleware

func NewMiddleware(tracer *go2sky.Tracer, opts ...Option) routing.Handler

Types

type Option added in v0.17.0

type Option func(opts *options)

func WithLog4xxBody added in v0.17.0

func WithLog4xxBody() Option

func WithLogError added in v0.17.0

func WithLogError() Option

Jump to

Keyboard shortcuts

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