inject_ctx

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultInjectFunc

func DefaultInjectFunc(ctx context.Context, req *http.Request) context.Context

DefaultInjectFunc 默认注入

func NewHandler

func NewHandler(h http.Handler, opts ...Option) http.Handler

Types

type InjectCtxFunc

type InjectCtxFunc func(ctx context.Context, req *http.Request) context.Context

InjectCtxFunc 注入ctx方法 不要使用 req.Context() 和 req.WithContext()

type Option

type Option func(*options)

func WithInjectCtxFunc

func WithInjectCtxFunc(fns ...InjectCtxFunc) Option

Jump to

Keyboard shortcuts

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