context

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {

	//rpc metadata
	Metadata *metadata.Metadata

	//Trace exists throughout the life cycle of the context
	//trace is request flow trace
	//it's will be from web client,or generated on initialize
	Trace trace.Trace

	//Content-Type
	ContentType string

	//request Header
	Header map[string]string
	// contains filtered or unexported fields
}

func Background

func Background() *Context

func (*Context) Codec added in v1.0.9

func (c *Context) Codec() codec.Codec

func (*Context) Debug

func (c *Context) Debug(msg ...interface{})

func (*Context) Debugf

func (c *Context) Debugf(f string, msg ...interface{})

func (*Context) Error

func (c *Context) Error(msg ...interface{})

func (*Context) Errorf

func (c *Context) Errorf(f string, msg ...interface{})

func (*Context) FromMetadata added in v1.1.16

func (c *Context) FromMetadata(b []byte)

func (*Context) Get added in v1.0.7

func (c *Context) Get(key string) interface{}

func (*Context) GetHeader added in v1.0.7

func (c *Context) GetHeader(key string) string

func (*Context) Info

func (c *Context) Info(msg ...interface{})

func (*Context) Infof

func (c *Context) Infof(f string, msg ...interface{})

func (*Context) Set added in v1.0.7

func (c *Context) Set(key string, value interface{})

func (*Context) SetHeader added in v1.0.7

func (c *Context) SetHeader(key, value string)

func (*Context) WithMetadata

func (c *Context) WithMetadata(service, method string, meta map[string]string) error

func (*Context) WithSetup added in v1.1.16

func (c *Context) WithSetup(data, meta []byte) error

Jump to

Keyboard shortcuts

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