requestid

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CtxKey ctxKeyType = iota
)

Variables

This section is empty.

Functions

func Middleware

func Middleware(next http.Handler) http.Handler

func SaveContext

func SaveContext(ctx context.Context, ref *Context) context.Context

Types

type Context

type Context struct {
	RequestID string `json:"request_id"`
}

func GetContext

func GetContext(ctx context.Context) *Context

func NewContext

func NewContext(r *http.Request) *Context

Jump to

Keyboard shortcuts

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