Documentation ¶
Index ¶
- Constants
- Variables
- type Frame
- func (r *Frame) Clone() api.HeaderMap
- func (r *Frame) GetData() types.IoBuffer
- func (r *Frame) GetHeader() types.HeaderMap
- func (r *Frame) GetRequestId() uint64
- func (r *Frame) GetStatusCode() uint32
- func (r *Frame) GetStreamType() api.StreamType
- func (r *Frame) GetTimeout() int32
- func (r *Frame) IsHeartbeatFrame() bool
- func (r *Frame) SetData(data types.IoBuffer)
- func (r *Frame) SetRequestId(id uint64)
- type Header
- type XCodec
Constants ¶
View Source
const ( MessageLenSize = 4 MagicLen = 2 MessageLenIdx = 2 MessageHeaderLenIdx = 6 MessageHeaderLenSize = 2 HeaderIdx = 9 HeaderLen = 9 IdLen = 8 )
thrift protocol
View Source
const ( EventRequest int = 1 // request EventResponse int = 2 // response )
View Source
const ( ServiceNameHeader string = "service" MethodNameHeader string = "method" SeqIdNameHeader string = "seqId" MessageTypeNameHeader string = "messageType" )
View Source
const (
ProtocolName = "dubbo-thrift"
)
View Source
const (
ResponseStatusSuccess = uint16(thrift.REPLY)
)
View Source
const (
UnKnownCmdType string = "unknown cmd type"
)
req/resp type
Variables ¶
View Source
var MagicTag = []byte{0xda, 0xbc}
*
- Thrift framed protocol codec for dubbo. *
- |<- message header ->|<- message body ->|
- +----------------------+----------------+----------------------+------------------+---------------------------+------------------+
- message size (4 byte) | magic (2 bytes)|message size (4 bytes)|head size(2 bytes)| version (1 byte) | header | message body |
- +----------------------+----------------+----------------------+------------------+---------------------------+------------------+
- |<- message size ->| *
- header fields in version 1:
- string - service name
- long - dubbo request id
Functions ¶
This section is empty.
Types ¶
type Frame ¶
type Frame struct { Header // contains filtered or unexported fields }
func NewRpcRequest ¶
NewRpcRequest is a utility function which build rpc Request object of bolt protocol.
func NewRpcResponse ¶
NewRpcResponse is a utility function which build rpc Response object of bolt protocol.
func (*Frame) GetStatusCode ¶
func (*Frame) GetStreamType ¶
func (r *Frame) GetStreamType() api.StreamType
func (*Frame) GetTimeout ¶ added in v0.22.0
dubbothrift use defualt timeout TODO: use dubbothrift timeout
func (*Frame) IsHeartbeatFrame ¶
func (*Frame) 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
not implement yet
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.