request

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const RequestIDHeader = "X-Request-Id"

RequestIDHeader is the name of the header we use to return request IDs for debugging

Variables

This section is empty.

Functions

func GetAuthHeader added in v0.6.5

func GetAuthHeader(ctx context.Context) string

GetAuthHeader returns the Authorization Header for this particular request

func GetHostname

func GetHostname(ctx context.Context) string

GetHostname returns the hostname used for this particular request

func GetRequestID

func GetRequestID(ctx context.Context) uuid.UUID

GetRequestID returns a per request id if one was set

func GetRequestIDFromHeader

func GetRequestIDFromHeader(header http.Header) string

GetRequestIDFromHeader returns the request ID a response headers if present, otherwise, returns an empty string

func SetRequestID

func SetRequestID(ctx context.Context, requestID uuid.UUID) context.Context

SetRequestID set the Request ID for this request

func SetRequestIDIfNotSet added in v0.6.6

func SetRequestIDIfNotSet(ctx context.Context, requestID uuid.UUID) context.Context

SetRequestIDIfNotSet sets the Request ID for this request if it is not already set

Types

This section is empty.

Jump to

Keyboard shortcuts

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