Documentation
¶
Index ¶
Constants ¶
View Source
const JournalHeader = "Journal-Id"
JournalHeader http/rpc header中的名字
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dialog ¶
type Dialog struct { Request *Request `json:"request"` Responses []*Response `json:"responses"` Success bool `json:"success"` CostSeconds float64 `json:"cost_seconds"` // contains filtered or unexported fields }
Dialog 内部调用其它方接口的会话信息;失败时会有retry操作,所以response会有多次。
func (*Dialog) AppendResponse ¶
AppendResponse 按转的追加response信息
type Journal ¶
type Journal struct { Identifier string `json:"id"` Request *Request `json:"request"` Response *Response `json:"response"` Dialogs []*Dialog `json:"dialogs"` Success bool `json:"success"` CostSeconds float64 `json:"cost_seconds"` // contains filtered or unexported fields }
Journal 包含一次rpc请求的全部参数和内部调用其它方接口的过程
func (*Journal) AppendDialog ¶
AppendDialog 安全的追加内部调用过程dialog
func (*Journal) WithRequest ¶
WithRequest 设置request
func (*Journal) WithResponse ¶
WithResponse 设置response
type Request ¶
type Request struct { TTL string `json:"ttl"` Method string `json:"method"` DecodedURL string `json:"decoded_url"` Header map[string]string `json:"header"` Body string `json:"body"` }
Request 请求信息
Click to show internal directories.
Click to hide internal directories.