request

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithRequestInfo

func WithRequestInfo(parent context.Context, info *RequestInfo) context.Context

WithRequestInfo returns a copy of parent in which the request info value is set

func WithValue

func WithValue(parent context.Context, key interface{}, val interface{}) context.Context

WithValue returns a copy of parent in which the value associated with key is val.

Types

type RequestInfo

type RequestInfo struct {
	// contains filtered or unexported fields
}

RequestInfo includes information about a request.

func RequestInfoFrom

func RequestInfoFrom(ctx context.Context) (*RequestInfo, bool)

RequestInfoFrom returns the value of the RequestInfo key on the ctx

type RequestInfoResolver

type RequestInfoResolver interface {
	NewRequestInfo(req *http.Request) (*RequestInfo, error)
}

RequestInfoResolver represents a request info resolver that can be used to resolver requests.

Jump to

Keyboard shortcuts

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