utils

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HandlerTypeCustom Set this value in any custom handler bypassing grpc-middleware.
	// This makes sure that any value passed in the context is processed by UAM middlewares
	HandlerTypeCustom  = "custom-handler"
	HeaderKeyRequestID = "x-request-id"
	HeaderKeyAuditID   = "x-nv-audit-id"
	HeaderETag         = "etag"
	HeaderNewETag      = "new-etag"
	HeaderIfMatch      = "if-match"
)
View Source
const HeaderNVPrefix = "nvkit-"

Variables

Functions

func AddRequestInfoToContext

func AddRequestInfoToContext(req *http.Request) *http.Request

AddRequestInfoToContext adds any custom values from request headers to request context that helps nvkit middleware

func GetMetadataFromRequest

func GetMetadataFromRequest(req *http.Request) metadata.MD

GetMetadataFromRequest gets any custom values to be added to request metadata that helps nvkit middleware

func HeaderAppender

func HeaderAppender() grpctransport.ServerResponseFunc

HeaderAppender adds header information to the response NOTE: This function is only called in the success path of go-kit's framework. In the error-path, error-handler handles populating the right header

func HeaderProvider

func HeaderProvider() grpctransport.ServerRequestFunc

HeaderProvider provides a way to append headers to the request context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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