Documentation ¶
Index ¶
- Constants
- Variables
- type Request
- func (r *Request) GetData() types.IoBuffer
- func (r *Request) GetHeader() types.HeaderMap
- func (r *Request) GetRequestId() uint64
- func (r *Request) GetStreamType() api.StreamType
- func (r *Request) GetTimeout() int32
- func (r *Request) IsHeartbeatFrame() bool
- func (r *Request) SetData(data types.IoBuffer)
- func (r *Request) SetRequestId(id uint64)
- type Response
- func (r *Response) GetData() types.IoBuffer
- func (r *Response) GetHeader() types.HeaderMap
- func (r *Response) GetRequestId() uint64
- func (r *Response) GetStatusCode() uint32
- func (r *Response) GetStreamType() api.StreamType
- func (r *Response) GetTimeout() int32
- func (r *Response) IsHeartbeatFrame() bool
- func (r *Response) SetData(data types.IoBuffer)
- func (r *Response) SetRequestId(id uint64)
- type XCodec
Constants ¶
View Source
const ( MessageSizeLen int = 4 IVersionLen int = 2 IVersionHeaderIdx int = 4 )
View Source
const ( CmdTypeResponse byte = 0 // cmd type CmdTypeRequest byte = 1 CmdTypeUndefine byte = 2 UnKnownCmdType string = "unknown cmd type" )
View Source
const ( ServiceNameHeader string = "service" MethodNameHeader string = "method" )
View Source
const (
ProtocolName = "tars"
)
View Source
const (
ResponseStatusSuccess uint16 = 0x00 // 0x00 response status
)
Variables ¶
View Source
var MagicTag = []byte{0xda, 0xbb}
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct { protocol.CommonHeader // contains filtered or unexported fields }
func NewRpcRequest ¶
NewRpcRequest is a utility function which build rpc Request object of bolt protocol.
func (*Request) GetStreamType ¶
func (r *Request) GetStreamType() api.StreamType
func (*Request) GetTimeout ¶ added in v0.22.0
TODO: add timeout
func (*Request) IsHeartbeatFrame ¶
func (*Request) SetRequestId ¶
type Response ¶
type Response struct { protocol.CommonHeader // contains filtered or unexported fields }
func NewRpcResponse ¶
NewRpcResponse is a utility function which build rpc Response object of bolt protocol.
func (*Response) GetStatusCode ¶
func (*Response) GetStreamType ¶
func (r *Response) GetStreamType() api.StreamType
func (*Response) GetTimeout ¶ added in v0.22.0
response contains no timeout
func (*Response) IsHeartbeatFrame ¶
func (*Response) SetRequestId ¶
type XCodec ¶ added in v0.26.0
type XCodec struct {
// contains filtered or unexported fields
}
func (*XCodec) HTTPMapping ¶ added in v0.26.0
func (codec *XCodec) HTTPMapping() api.HTTPMapping
func (*XCodec) NewXProtocol ¶ added in v0.26.0
func (*XCodec) ProtocolMatch ¶ added in v0.26.0
func (codec *XCodec) ProtocolMatch() api.ProtocolMatch
func (*XCodec) ProtocolName ¶ added in v0.26.0
func (codec *XCodec) ProtocolName() api.ProtocolName
Click to show internal directories.
Click to hide internal directories.