Documentation ¶
Index ¶
- Constants
- func ConstructHeader(header *bytes.Buffer, payloadLength uint64, cookie uint32) error
- func ConstructPayload(payload *bytes.Buffer, valType uint, val interface{}) error
- func InvokeMethod(method string, host string, port string) error
- func WritePacket(w io.Writer, valType uint, val interface{}) error
- type BinRpcEncoder
- type BinRpcInt
- type BinRpcString
Constants ¶
View Source
const ( BinRpcMagic uint = 0xA BinRpcVersion uint = 0x1 BinRpcMagicVersion uint = BinRpcMagic<<4 + BinRpcVersion BinRpcTypeInt uint = 0x0 BinRpcTypeString uint = 0x1 // Null-terminated string BinRpcTypeDouble uint = 0x2 BinRpcTypeStruct uint = 0x3 BinRpcTypeArray uint = 0x4 BinRpcTypeAVP uint = 0x5 BinRpcTypeBytes uint = 0x6 // Byte array without null terminator BinRpcTypeAll uint = 0xF // Wildcard; matches any record )
Variables ¶
This section is empty.
Functions ¶
func ConstructHeader ¶
ConstructHeader takes the payload length and cookie and returns a byte array header
func ConstructPayload ¶
ConstructPayload takes a value and encodes it into a BinRpc payload
func InvokeMethod ¶
InvokeMethod calls the given RPC method on the given host and port
Types ¶
type BinRpcEncoder ¶
type BinRpcString ¶
type BinRpcString string
Click to show internal directories.
Click to hide internal directories.