transport

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 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 自定义context

func CustomContextKeysLength added in v0.6.4

func CustomContextKeysLength() int

CustomContextKeysLength 自定义context keys长度

func Set

func Set(arr []string)

Set 设置context key arr

func Value

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

Value 获取数据

func WithValue

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

WithValue 设置数据

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