codec

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientInfo added in v0.0.31

type ClientInfo struct {
	IP string `json:"ip"`
	UA string `json:"ua"`
}

type MDKey

type MDKey string
const (
	MDMessage MDKey = "HRPC_MD_MESSAGE"
)

func (MDKey) String

func (m MDKey) String() string

type MSG

type MSG interface {
	Context() context.Context

	TraceID() string
	WithTraceID(s string)

	RequestTimeout() time.Duration
	WithRequestTimeout(t time.Duration)

	Namespace() string
	WithNamespace(n string)

	ServerName() string
	WithServerName(n string)

	Client() ClientInfo
	WithClient(ip, ua string)

	Metadata() metadata.MD
}

func Message

func Message(ctx context.Context) MSG

Jump to

Keyboard shortcuts

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