transport

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 3 Imported by: 4

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

func CustomContextKeysLength() int

CustomContextKeysLength returns custom content key list length

func Set

func Set(arr []string)

Set 设置context key arr

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

type GrpcHeaderCarrier metadata.MD

GrpcHeaderCarrier ...

func (GrpcHeaderCarrier) Get

func (mc GrpcHeaderCarrier) Get(key string) string

Get returns the value associated with the passed key.

func (GrpcHeaderCarrier) Keys

func (mc GrpcHeaderCarrier) Keys() []string

Keys lists the keys stored in this carrier.

func (GrpcHeaderCarrier) Set

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