headers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package headers is used to provide ethclient with the ability to inject http headers

Index

Constants

View Source
const (
	KeyConsistentHash = "x-blockchain-gateway-consistent-hash"
)

defines a set of wellknown header keys

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) (http.Header, bool)

FromContext is used to extract header information from context

func Inject

func Inject(ctx context.Context, headers http.Header)

Inject is used to extract headers information from the context and inject it into the provided headers

func WithHTTPHeader

func WithHTTPHeader(ctx context.Context, header http.Header) context.Context

WithHTTPHeader is used to attach header information to the context

Types

This section is empty.

Jump to

Keyboard shortcuts

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