Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HeaderStatus the Status key in header of thrift message HeaderStatus = "Tp-Status" // HeaderMeta the Meta key in header of thrift message HeaderMeta = "Tp-Meta" // HeaderBodyCodec the BodyCodec key in header of thrift message HeaderBodyCodec = "Tp-BodyCodec" // HeaderXferPipe the XferPipe key in header of thrift message HeaderXferPipe = "Tp-XferPipe" )
Variables ¶
This section is empty.
Functions ¶
func NewBinaryProtoFunc ¶
func NewBinaryProtoFunc() erpc.ProtoFunc
NewBinaryProtoFunc creates erpc.ProtoFunc of Thrift protocol. NOTE:
Marshal the body into binary; Support the Meta, BodyCodec and XferPipe.
func NewStructProtoFunc ¶
func NewStructProtoFunc() erpc.ProtoFunc
NewStructProtoFunc creates erpc.ProtoFunc of Thrift protocol. NOTE:
The body codec must be thrift, directly encoded as a thrift.TStruct; Support the Meta, but not support the BodyCodec and XferPipe.
Types ¶
type BaseTTransport ¶
type BaseTTransport struct {
*utils.ReadWriteCounter
}
BaseTTransport the base thrift transport
func (*BaseTTransport) Flush ¶
func (*BaseTTransport) Flush(context.Context) error
Flush flushing a memory buffer is a no-op.
func (*BaseTTransport) IsOpen ¶
func (*BaseTTransport) IsOpen() bool
IsOpen returns true if the transport is open.
func (*BaseTTransport) Open ¶
func (*BaseTTransport) Open() error
Open opens the transport for communication.
func (*BaseTTransport) RemainingBytes ¶
func (*BaseTTransport) RemainingBytes() (numBytes uint64)
RemainingBytes returns the number of remaining bytes.
Click to show internal directories.
Click to hide internal directories.