pthrift

package
v1.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// STOP stop field
	STOP byte = 0x0
)

Variables

This section is empty.

Functions

func DecodeBinary

func DecodeBinary(b []byte) (model.Map, error)

DecodeBinary 解析thrift binary协议

func DecodeCompact

func DecodeCompact(b []byte) (model.Map, error)

DecodeCompact 解析thrift compact协议

func ReplaceSequenceId added in v1.3.3

func ReplaceSequenceId(request []byte, callOutbound *recording.CallOutbound)

Types

type CompactKind

type CompactKind byte
const (
	CUnknowKind CompactKind = 0x00
	CTrue       CompactKind = 0x01
	CFalse      CompactKind = 0x02
	CByte       CompactKind = 0x03
	CI16        CompactKind = 0x04
	CI32        CompactKind = 0x05
	CI64        CompactKind = 0x06
	CDouble     CompactKind = 0x07
	CBinary     CompactKind = 0x08
	CList       CompactKind = 0x09
	CSet        CompactKind = 0x0a
	CMap        CompactKind = 0x0b
	CStruct     CompactKind = 0x0c
)

func GetCompactKind

func GetCompactKind(b byte) (CompactKind, error)

GetCompactKind ...

func (CompactKind) String

func (k CompactKind) String() string

func (CompactKind) ToKind

func (k CompactKind) ToKind() Kind

type Kind

type Kind byte
const (
	UnknowKind Kind = 0x00
	Bool       Kind = 0x02
	Byte       Kind = 0x03
	Double     Kind = 0x04
	I16        Kind = 0x06
	I32        Kind = 0x08
	I64        Kind = 0x0a
	String     Kind = 0x0b
	Struct     Kind = 0x0c
	Map        Kind = 0x0d
	Set        Kind = 0x0e
	List       Kind = 0x0f
)

func GetKind

func GetKind(b byte) (Kind, error)

GetKind ...

func (Kind) String

func (k Kind) String() string

type MessageType

type MessageType byte
const (
	UnknowMessageType MessageType = 0x00
	Call              MessageType = 0x01
	Reply             MessageType = 0x02
	Exception         MessageType = 0x03
	Oneway            MessageType = 0x04
)

func GetMessageType

func GetMessageType(b byte) (MessageType, error)

func (MessageType) String

func (mt MessageType) String() string

type ProtocolType

type ProtocolType byte
const (
	Binary ProtocolType = iota
	Compact
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL