scope

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MPL-2.0 Imports: 7 Imported by: 11

Documentation

Index

Constants

View Source
const XRequestID = "X-Request-ID"

Variables

This section is empty.

Functions

func NewCustomHeaderRangerPlugin

func NewCustomHeaderRangerPlugin(header http.Header) ranger.ClientPlugin

func NewRequestIDRangerPlugin

func NewRequestIDRangerPlugin(opts ...RequestIdOption) ranger.ClientPlugin

NewRequestIDPlugin creates a RangerPlugin that adds the X-Request-ID header to outgoing requests. All RPCs that share the same RangerPlugin will get the same ID

func ParseXInfoHeader

func ParseXInfoHeader(value string) (map[string]string, error)

func XInfoHeader

func XInfoHeader(keyValuePairs map[string]string) string

XInfoHeader encodes key/value pairs to a string that can be used as a HTTP header. The keys and values are sanitized to be used as HTTP header values. All spaces in keys and values are replaced with dashes.

Types

type RequestIdOption

type RequestIdOption func(s *requestIdPlugin)

func WithUuid

func WithUuid(requestId string) RequestIdOption

Jump to

Keyboard shortcuts

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