Documentation ¶
Index ¶
- type Context
- func (c *Context) Codec() codec.Codec
- func (c *Context) Debug(msg ...interface{})
- func (c *Context) Debugf(f string, msg ...interface{})
- func (c *Context) Error(msg ...interface{})
- func (c *Context) Errorf(f string, msg ...interface{})
- func (c *Context) FromMetadata(b []byte)
- func (c *Context) Get(key string) interface{}
- func (c *Context) GetHeader(key string) string
- func (c *Context) Info(msg ...interface{})
- func (c *Context) Infof(f string, msg ...interface{})
- func (c *Context) Set(key string, value interface{})
- func (c *Context) SetHeader(key, value string)
- func (c *Context) WithMetadata(service, method string, meta map[string]string) error
- func (c *Context) WithSetup(data, meta []byte) error
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) FromMetadata ¶ added in v1.1.16
func (*Context) WithMetadata ¶
Click to show internal directories.
Click to hide internal directories.