Documentation ¶
Index ¶
Constants ¶
View Source
const (
SeataV1PackageHeaderReservedLength = 16
)
*
- <pre>
- 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
- | magic |Proto| Full length | Head | Msg |Seria|Compr| RequestID |
- | code |colVer| (head+body) | Length |Type |lizer|ess | |
- +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
- | |
- | Head Map [Optional] |
- +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
- | |
- | body |
- | |
- | ... ... |
- +-----------------------------------------------------------------------------------------------+
- </pre>
- <p>
- <li>Full Length: include all data </li>
- <li>Head Length: include head data from magic code to head map. </li>
- <li>Body Length: Full Length - Head Length</li>
- </p>
- https://github.com/seata/seata/issues/893
Variables ¶
View Source
var ( ErrNotEnoughStream = errors.New("packet stream is not enough") ErrTooLargePackage = errors.New("package length is exceed the getty package's legal maximum length.") ErrInvalidPackage = errors.New("invalid rpc package") ErrIllegalMagic = errors.New("package magic is not right.") )
View Source
var ( // RpcPkgHandler RpcPkgHandler = &RpcPackageHandler{} )
Functions ¶
This section is empty.
Types ¶
type RpcPackageHandler ¶
type RpcPackageHandler struct{}
Click to show internal directories.
Click to hide internal directories.