meta

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// RequestIDOnMetaData unique request id
	RequestIDOnMetaData = "ymi-micro-srv-req-id"
)

Variables

This section is empty.

Functions

func GetFromMetaString

func GetFromMetaString(ctx context.Context, key string) (string, error)

func GetIntFromMeta

func GetIntFromMeta(ctx context.Context, key string) (int64, error)

func GetRequestIDFromMD

func GetRequestIDFromMD(md metadata.MD) string

func GetStringFromMeta

func GetStringFromMeta(ctx context.Context, key string) (string, error)

func IDFromOutgoingContext added in v0.0.18

func IDFromOutgoingContext(ctx context.Context) string

func TransferContextMeta

func TransferContextMeta(ctx context.Context, keys []string) context.Context

nolint: gocognit

Types

type MDReaderWriter

type MDReaderWriter struct {
	MD metadata.MD
}

func (MDReaderWriter) ForeachKey

func (rw MDReaderWriter) ForeachKey(handler func(key, val string) error) error

func (MDReaderWriter) Set

func (rw MDReaderWriter) Set(key, val string)

Jump to

Keyboard shortcuts

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