Versions in this module Expand all Collapse all v1 v1.0.4 Aug 8, 2022 Changes in this version + const SeataV1PackageHeaderReservedLength + var ErrIllegalMagic = errors.New("package magic is not right.") + var ErrInvalidPackage = errors.New("invalid rpc package") + var ErrNotEnoughStream = errors.New("packet stream is not enough") + var ErrTooLargePackage = errors.New("package length is exceed the getty package's legal maximum length.") + var RpcPkgHandler = &RpcPackageHandler + type RpcPackageHandler struct + func (p *RpcPackageHandler) Read(ss getty.Session, data []byte) (interface{}, int, error) + func (p *RpcPackageHandler) Write(ss getty.Session, pkg interface{}) ([]byte, error) + type SeataV1PackageHeader struct + BodyLength uint32 + CodecType byte + CompressType byte + HeadLength uint16 + ID uint32 + Magic0 byte + Magic1 byte + MessageType byte + Meta map[string]string + TotalLength uint32 + Version byte + func (h *SeataV1PackageHeader) Unmarshal(buf *bytes.Buffer) (int, error)