request

package
v5.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: MIT Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRequestID

func GenerateRequestID() string

GenerateRequestID generates a new random-enough request id for a request context

func GetRequestID

func GetRequestID(ctx context.Context) (string, bool)

func NewRequestContext

func NewRequestContext() context.Context

NewRequestContext creates a new request context from context.Background()

func NewRequestContextFrom

func NewRequestContextFrom(ctx context.Context) context.Context

NewRequestContextFrom creates a new request context from an existing context regenerating a request_id value

func NewRequestContextWithRequestID

func NewRequestContextWithRequestID(ctx context.Context, rid string) context.Context

NewRequestContextWithRequestID creates a new request context from an existing context with the provided request id rid

Types

type ContextKey

type ContextKey string

ContextKey is a wrapper type for our keys attached to a context

Jump to

Keyboard shortcuts

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