Documentation ¶
Overview ¶
Package wire is a generated protocol buffer package.
protorpc wire format wrapper 0. Frame Format len : uvarint64 data: byte[len] 1. Client Send Request Send RequestHeader: sendFrame(conn, hdr, len(hdr)) Send Request: sendFrame(conn, body, len(body)) 2. Server Recv Request Recv RequestHeader: recvFrame(conn, hdr, max_hdr_len, 0) Recv Request: recvFrame(conn, body) 3. Server Send Response Send ResponseHeader: sendFrame(conn, hdr, len(hdr)) Send Response: sendFrame(conn, body, len(body)) 4. Client Recv Response Recv ResponseHeader: recvFrame(conn, hdr, max_hdr_len, 0) Recv Response: recvFrame(conn, body)
It is generated from these files:
cockroach/rpc/codec/wire/wire.proto
It has these top-level messages:
RequestHeader ResponseHeader
Index ¶
- Variables
- type CompressionType
- type RequestHeader
- func (m *RequestHeader) GetCompression() CompressionType
- func (m *RequestHeader) GetId() uint64
- func (m *RequestHeader) GetMethod() string
- func (m *RequestHeader) GetMethodId() int32
- func (m *RequestHeader) GetUncompressedSize() uint32
- func (m *RequestHeader) Marshal() (data []byte, err error)
- func (m *RequestHeader) MarshalTo(data []byte) (int, error)
- func (*RequestHeader) ProtoMessage()
- func (m *RequestHeader) Reset()
- func (m *RequestHeader) Size() (n int)
- func (m *RequestHeader) String() string
- func (m *RequestHeader) Unmarshal(data []byte) error
- type ResponseHeader
- func (m *ResponseHeader) GetCompression() CompressionType
- func (m *ResponseHeader) GetError() string
- func (m *ResponseHeader) GetId() uint64
- func (m *ResponseHeader) GetMethod() string
- func (m *ResponseHeader) GetUncompressedSize() uint32
- func (m *ResponseHeader) Marshal() (data []byte, err error)
- func (m *ResponseHeader) MarshalTo(data []byte) (int, error)
- func (*ResponseHeader) ProtoMessage()
- func (m *ResponseHeader) Reset()
- func (m *ResponseHeader) Size() (n int)
- func (m *ResponseHeader) String() string
- func (m *ResponseHeader) Unmarshal(data []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var CompressionType_name = map[int32]string{
0: "NONE",
1: "SNAPPY",
2: "LZ4",
}
View Source
var CompressionType_value = map[string]int32{
"NONE": 0,
"SNAPPY": 1,
"LZ4": 2,
}
View Source
var (
ErrInvalidLengthWire = fmt.Errorf("proto: negative length found during unmarshaling")
)
Functions ¶
This section is empty.
Types ¶
type CompressionType ¶
type CompressionType int32
const ( CompressionType_NONE CompressionType = 0 CompressionType_SNAPPY CompressionType = 1 CompressionType_LZ4 CompressionType = 2 )
func (CompressionType) Enum ¶
func (x CompressionType) Enum() *CompressionType
func (CompressionType) String ¶
func (x CompressionType) String() string
func (*CompressionType) UnmarshalJSON ¶
func (x *CompressionType) UnmarshalJSON(data []byte) error
type RequestHeader ¶
type RequestHeader struct { Id uint64 `protobuf:"varint,1,opt,name=id" json:"id"` Method *string `protobuf:"bytes,2,opt,name=method" json:"method,omitempty"` MethodId int32 `protobuf:"varint,3,opt,name=method_id" json:"method_id"` Compression CompressionType `protobuf:"varint,4,opt,name=compression,enum=cockroach.rpc.codec.wire.CompressionType" json:"compression"` UncompressedSize uint32 `protobuf:"varint,5,opt,name=uncompressed_size" json:"uncompressed_size"` }
func (*RequestHeader) GetCompression ¶
func (m *RequestHeader) GetCompression() CompressionType
func (*RequestHeader) GetId ¶
func (m *RequestHeader) GetId() uint64
func (*RequestHeader) GetMethod ¶
func (m *RequestHeader) GetMethod() string
func (*RequestHeader) GetMethodId ¶
func (m *RequestHeader) GetMethodId() int32
func (*RequestHeader) GetUncompressedSize ¶
func (m *RequestHeader) GetUncompressedSize() uint32
func (*RequestHeader) Marshal ¶
func (m *RequestHeader) Marshal() (data []byte, err error)
func (*RequestHeader) ProtoMessage ¶
func (*RequestHeader) ProtoMessage()
func (*RequestHeader) Reset ¶
func (m *RequestHeader) Reset()
func (*RequestHeader) Size ¶
func (m *RequestHeader) Size() (n int)
func (*RequestHeader) String ¶
func (m *RequestHeader) String() string
func (*RequestHeader) Unmarshal ¶
func (m *RequestHeader) Unmarshal(data []byte) error
type ResponseHeader ¶
type ResponseHeader struct { Id uint64 `protobuf:"varint,1,opt,name=id" json:"id"` Method *string `protobuf:"bytes,2,opt,name=method" json:"method,omitempty"` Error string `protobuf:"bytes,3,opt,name=error" json:"error"` Compression CompressionType `protobuf:"varint,4,opt,name=compression,enum=cockroach.rpc.codec.wire.CompressionType" json:"compression"` UncompressedSize uint32 `protobuf:"varint,5,opt,name=uncompressed_size" json:"uncompressed_size"` }
func (*ResponseHeader) GetCompression ¶
func (m *ResponseHeader) GetCompression() CompressionType
func (*ResponseHeader) GetError ¶
func (m *ResponseHeader) GetError() string
func (*ResponseHeader) GetId ¶
func (m *ResponseHeader) GetId() uint64
func (*ResponseHeader) GetMethod ¶
func (m *ResponseHeader) GetMethod() string
func (*ResponseHeader) GetUncompressedSize ¶
func (m *ResponseHeader) GetUncompressedSize() uint32
func (*ResponseHeader) Marshal ¶
func (m *ResponseHeader) Marshal() (data []byte, err error)
func (*ResponseHeader) ProtoMessage ¶
func (*ResponseHeader) ProtoMessage()
func (*ResponseHeader) Reset ¶
func (m *ResponseHeader) Reset()
func (*ResponseHeader) Size ¶
func (m *ResponseHeader) Size() (n int)
func (*ResponseHeader) String ¶
func (m *ResponseHeader) String() string
func (*ResponseHeader) Unmarshal ¶
func (m *ResponseHeader) Unmarshal(data []byte) error
Click to show internal directories.
Click to hide internal directories.