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() xprotocol.StreamType
- func (r *Frame) IsHeartbeatFrame() bool
- func (r *Frame) SetData(data types.IoBuffer)
- func (r *Frame) SetRequestId(id uint64)
- type Header
- type Metadata
- type Node
Constants ¶
View Source
const ( HeaderLen = 16 IdLen = 8 MagicIdx = 0 FlagIdx = 2 StatusIdx = 3 IdIdx = 4 DataLenIdx = 12 DataLenSize = 4 )
dubbo protocol
View Source
const ( CmdTypeResponse byte = 0 // cmd type CmdTypeRequest byte = 1 CmdTypeRequestOneway byte = 2 UnKnownCmdType string = "unknown cmd type" )
req/resp type
View Source
const ( EventRequest int = 1 // request EventResponse int = 0 // response )
View Source
const ( FrameworkVersionNameHeader string = "dubbo" ServiceNameHeader string = "service" MethodNameHeader string = "method" VersionNameHeader string = "version" GroupNameHeader string = "group" InterfaceNameHeader string = "interface" )
View Source
const ( EgressDubbo string = "egress_dubbo" IngressDubbo string = "ingress_dubbo" )
View Source
const (
ProtocolName = "dubbo"
)
View Source
const (
ResponseStatusSuccess uint16 = 0x14 // 0x14 response status
)
Variables ¶
View Source
var DubboPubMetadata = &Metadata{}
DubboPubMetadata dubbo pub cache metadata
View Source
var DubboSubMetadata = &Metadata{}
DubboSubMetadata dubbo sub cache metadata
View Source
var MagicTag = []byte{0xda, 0xbb}
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() xprotocol.StreamType
func (*Frame) IsHeartbeatFrame ¶
func (*Frame) SetRequestId ¶
type Header ¶
type Header struct { Magic []byte Flag byte Status byte Id uint64 DataLen uint32 IsEvent bool // true: heartbeat or readonly event IsTwoWay bool // true: send request and expect response, false: just request without response Direction int // 1 mean req SerializationId int // 2 mean hessian protocol.CommonHeader }
type Metadata ¶ added in v0.13.0
type Metadata struct {
// contains filtered or unexported fields
}
Metadata cache service pub or sub metadata. speed up for decode or encode dubbo peformance. please do not use outside of the dubbo framwork.
func (*Metadata) Contains ¶ added in v0.13.0
Contains check if cached pub or sub metatada strict exists. caller should be check match is true
Click to show internal directories.
Click to hide internal directories.