Documentation ¶
Index ¶
- func GetConnectTimeout(ctx context.Context) int
- func GetFusingProperties(ctx context.Context) map[string]string
- func GetHttpHeader(ctx context.Context) http.Header
- func GetLbHashKey(ctx context.Context) string
- func GetRecvTimeout(ctx context.Context) int
- func GetRpcCluster(ctx context.Context) string
- func GetSendTimeout(ctx context.Context) int
- type CallInfo
- type Context
- func (ctx *Context) GetConfig() *config.ServiceConfig
- func (ctx *Context) GetConnectTimeoutMsec() int
- func (ctx *Context) GetFusingProperties() map[string]string
- func (ctx *Context) GetLbHashKey() string
- func (ctx *Context) GetRecvTimeoutMsec() int
- func (ctx *Context) GetRpcCluster() string
- func (ctx *Context) GetSendTimeoutMsec() int
- func (ctx *Context) SetConfig(conf *config.ServiceConfig)
- func (ctx *Context) SetConnectTimeoutMsec(connectTimeoutMsec int)
- func (ctx *Context) SetFusingProperties(fusingProperties map[string]string)
- func (ctx *Context) SetHintInfo(hintcode string, hintcontent string)
- func (ctx *Context) SetLbHashKey(key string)
- func (ctx *Context) SetRecvTimeoutMsec(recvTimeoutMsec int)
- func (ctx *Context) SetRpcCluster(cluster string)
- func (ctx *Context) SetSendTimeoutMsec(sendTimeoutMsec int)
- func (ctx *Context) SetTraceInfo(traceid string, spanid string)
- type DirpcContext
- func (p *DirpcContext) GetCACert() string
- func (p *DirpcContext) GetConnectTimeoutMsec() int
- func (p *DirpcContext) GetCustomHttpHeader() http.Header
- func (p *DirpcContext) GetFusingProperties() map[string]string
- func (p *DirpcContext) GetKeepAlive() *bool
- func (p *DirpcContext) GetLogEntry() string
- func (p *DirpcContext) GetRecvTimeoutMsec() int
- func (p *DirpcContext) GetRestfulUrl() string
- func (p *DirpcContext) GetRetryNum() *int
- func (p *DirpcContext) GetRpcCluster() string
- func (p *DirpcContext) GetScheme() string
- func (p *DirpcContext) GetSendTimeoutMsec() int
- func (p *DirpcContext) GetTimeoutMsec() int
- func (p *DirpcContext) GetUrlValues() url.Values
- func (p *DirpcContext) SetErr(err error) *DirpcContext
- func (p *DirpcContext) SetLatency(latency time.Duration) *DirpcContext
- type Footprint
- type MapForRestFulUrl
- type UriForCallee
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConnectTimeout ¶
func GetLbHashKey ¶
func GetRecvTimeout ¶
func GetRpcCluster ¶
func GetSendTimeout ¶
Types ¶
type CallInfo ¶
type CallInfo struct { // 其它 RetryFlag int // 当前是第几次重试 // 延迟信息 Latency time.Duration Footprint *Footprint // 错误信息 ErrNo int ErrMsg string // Host Host string Ip string KeepAlive bool Timeout int ConnectTimeout int Retry int Chaos int FusingType string // 熔断类型 取值:auto、manual MeshDegradeType string /***** http *******/ // 入参、出参 Url string Path string Body string Resp string // Header Headers http.Header //mesh真实访问ip MeshRealIp string }
func NewCallInfo ¶
func NewCallInfo() *CallInfo
type Context ¶
type Context struct { CallInfo *common.CallInfo HttpHeader http.Header //用于上报没有设置trace的metric NoTraceFlag bool //用于hashringlb负载. LbHashKey string // contains filtered or unexported fields }
func NewContext ¶
func NewContext() *Context
func (*Context) GetConfig ¶
func (ctx *Context) GetConfig() *config.ServiceConfig
func (*Context) GetConnectTimeoutMsec ¶
func (*Context) GetFusingProperties ¶
func (*Context) GetLbHashKey ¶
func (*Context) GetRecvTimeoutMsec ¶
func (*Context) GetRpcCluster ¶
func (*Context) GetSendTimeoutMsec ¶
func (*Context) SetConfig ¶
func (ctx *Context) SetConfig(conf *config.ServiceConfig)
func (*Context) SetConnectTimeoutMsec ¶
func (*Context) SetFusingProperties ¶
func (*Context) SetHintInfo ¶
func (*Context) SetLbHashKey ¶
func (*Context) SetRecvTimeoutMsec ¶
func (*Context) SetRpcCluster ¶
func (*Context) SetSendTimeoutMsec ¶
func (*Context) SetTraceInfo ¶
type DirpcContext ¶
type DirpcContext struct { gin.Context CallInfo *CallInfo Conf *config.ServiceConfig }
func NewDirpcContext ¶
func NewDirpcContext(ctx gin.Context) *DirpcContext
func (*DirpcContext) GetCACert ¶
func (p *DirpcContext) GetCACert() string
func (*DirpcContext) GetConnectTimeoutMsec ¶
func (p *DirpcContext) GetConnectTimeoutMsec() int
func (*DirpcContext) GetCustomHttpHeader ¶
func (p *DirpcContext) GetCustomHttpHeader() http.Header
func (*DirpcContext) GetFusingProperties ¶
func (p *DirpcContext) GetFusingProperties() map[string]string
func (*DirpcContext) GetKeepAlive ¶
func (p *DirpcContext) GetKeepAlive() *bool
func (*DirpcContext) GetLogEntry ¶
func (p *DirpcContext) GetLogEntry() string
func (*DirpcContext) GetRecvTimeoutMsec ¶
func (p *DirpcContext) GetRecvTimeoutMsec() int
func (*DirpcContext) GetRestfulUrl ¶
func (p *DirpcContext) GetRestfulUrl() string
func (*DirpcContext) GetRetryNum ¶
func (p *DirpcContext) GetRetryNum() *int
func (*DirpcContext) GetRpcCluster ¶
func (p *DirpcContext) GetRpcCluster() string
func (*DirpcContext) GetScheme ¶
func (p *DirpcContext) GetScheme() string
func (*DirpcContext) GetSendTimeoutMsec ¶
func (p *DirpcContext) GetSendTimeoutMsec() int
func (*DirpcContext) GetTimeoutMsec ¶
func (p *DirpcContext) GetTimeoutMsec() int
func (*DirpcContext) GetUrlValues ¶
func (p *DirpcContext) GetUrlValues() url.Values
func (*DirpcContext) SetErr ¶
func (p *DirpcContext) SetErr(err error) *DirpcContext
func (*DirpcContext) SetLatency ¶
func (p *DirpcContext) SetLatency(latency time.Duration) *DirpcContext
type Footprint ¶
type Footprint struct {
// contains filtered or unexported fields
}
func NewFootprint ¶
func NewFootprint() *Footprint
type MapForRestFulUrl ¶
type MapForRestFulUrl struct{}
type UriForCallee ¶
type UriForCallee struct{}
Click to show internal directories.
Click to hide internal directories.