transport

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 3 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomContextKeys

func CustomContextKeys() []string

CustomContextKeys returns custom content key list

func CustomContextKeysLength added in v0.6.4

func CustomContextKeysLength() int

CustomContextKeysLength returns custom content key list length

func Set

func Set(arr []string)

Set overrides custom keys with provided array.

func Value

func Value(ctx context.Context, key string) interface{}

Value returns value of your key

func WithValue

func WithValue(ctx context.Context, key string, value interface{}) context.Context

WithValue returns a new context with your key and value

Types

type GrpcHeaderCarrier added in v0.8.0

type GrpcHeaderCarrier metadata.MD

GrpcHeaderCarrier ...

func (GrpcHeaderCarrier) Get added in v0.8.0

func (mc GrpcHeaderCarrier) Get(key string) string

Get returns the value associated with the passed key.

func (GrpcHeaderCarrier) Keys added in v0.8.0

func (mc GrpcHeaderCarrier) Keys() []string

Keys lists the keys stored in this carrier.

func (GrpcHeaderCarrier) Set added in v0.8.0

func (mc GrpcHeaderCarrier) Set(key string, value string)

Set stores the key-value pair.

Jump to

Keyboard shortcuts

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