Documentation
¶
Index ¶
- func Merge(from, to interfaces.Request)
- type Meta
- type Request
- func (r Request) GetID() string
- func (r Request) GetMeta() map[string]string
- func (r Request) GetMetaProp(key string) string
- func (r Request) GetParams() []byte
- func (r Request) GetPath() string
- func (r Request) GetTimeout() *int
- func (r Request) ParseParams(to interface{}) error
- func (r *Request) SetError(err error) interfaces.Request
- func (r *Request) SetID(id string) interfaces.Request
- func (r *Request) SetMeta(m map[string]string) interfaces.Request
- func (r *Request) SetMetaProp(key, value string) interfaces.Request
- func (r *Request) SetParams(params interface{}) error
- func (r *Request) SetPath(p string) interfaces.Request
- func (r *Request) SetTimeout(t int) interfaces.Request
- func (r *Request) SetTimeoutDuration(t time.Duration) interfaces.Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Merge ¶
func Merge(from, to interfaces.Request)
Merge the meta data Needed for cross service communication
Types ¶
type Request ¶
type Request struct { // Empty json tags because we need to omit those fields when generating the docs // and we do not plan to support json Path string `json:"-" msgpack:"path"` Params []byte `json:"-" msgpack:"params"` Meta Meta `json:"-" msgpack:"meta"` Timeout *int `json:"-" msgpack:"timeout"` Error error `json:"-" msgpack:",omitempty"` }
Request object swagger:ignore
func (*Request) SetError ¶
func (r *Request) SetError(err error) interfaces.Request
SetError that is returned when decoding the bytes (raw req)
func (*Request) SetID ¶
func (r *Request) SetID(id string) interfaces.Request
SetID for req - used for tracing and logging
func (*Request) SetMeta ¶
func (r *Request) SetMeta(m map[string]string) interfaces.Request
SetMeta for req
func (*Request) SetMetaProp ¶
func (r *Request) SetMetaProp(key, value string) interfaces.Request
SetMetaProp for req
func (*Request) SetTimeout ¶
func (r *Request) SetTimeout(t int) interfaces.Request
SetTimeout for req
func (*Request) SetTimeoutDuration ¶
func (r *Request) SetTimeoutDuration(t time.Duration) interfaces.Request
SetTimeoutDuration for req based on milliseconds
Click to show internal directories.
Click to hide internal directories.