Documentation
¶
Index ¶
- func Marshal(m MD) ([]byte, error)
- func NewIncomingContext(father context.Context, m map[string]any) context.Context
- func NewOutContext(father context.Context, m map[string]any) context.Context
- func Unmarshal(data []byte, dst *MD) error
- type MD
- func (ins *MD) Get(key string) (v any, exist bool)
- func (ins *MD) GetBool(key string) (bool, bool)
- func (ins *MD) GetFloat32(key string) (float32, bool)
- func (ins *MD) GetFloat64(key string) (float64, bool)
- func (ins *MD) GetInt(key string) (int, bool)
- func (ins *MD) GetInt8(key string) (int8, bool)
- func (ins *MD) GetInt16(key string) (int16, bool)
- func (ins *MD) GetInt32(key string) (int32, bool)
- func (ins *MD) GetInt64(key string) (int64, bool)
- func (ins *MD) GetString(key string) (string, bool)
- func (ins *MD) Set(key string, value any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIncomingContext ¶
NewIncomingContext creates a new context with incoming md attached. Note: md must not be modified after calling this function. Note: md 不能在调用此函数后被修改
func NewOutContext ¶
NewOutContext creates a new context with outgoing md attached. Note: md must not be modified after calling this function. Note: md 不能在调用此函数后被修改
Types ¶
Click to show internal directories.
Click to hide internal directories.