protorpc_wire

package
v0.0.0-...-d023741 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package protorpc_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(zsock, hdr, len(hdr))
Send Request: sendFrame(zsock, body, hdr.snappy_compressed_request_len)

2. Server Recv Request
Recv RequestHeader: recvFrame(zsock, hdr, max_hdr_len, 0)
Recv Request: recvFrame(zsock, body, hdr.snappy_compressed_request_len, 0)

3. Server Send Response
Send ResponseHeader: sendFrame(zsock, hdr, len(hdr))
Send Response: sendFrame(zsock, body, hdr.snappy_compressed_response_len)

4. Client Recv Response
Recv ResponseHeader: recvFrame(zsock, hdr, max_hdr_len, 0)
Recv Response: recvFrame(zsock, body, hdr.snappy_compressed_response_len, 0)

It is generated from these files:

wire.proto

It has these top-level messages:

RequestHeader
ResponseHeader

Index

Constants

This section is empty.

Variables

View Source
var Const_name = map[int32]string{
	0:    "ZERO",
	1024: "MAX_REQUEST_HEADER_LEN",
}
View Source
var Const_value = map[string]int32{
	"ZERO":                   0,
	"MAX_REQUEST_HEADER_LEN": 1024,
}

Functions

This section is empty.

Types

type Const

type Const int32
const (
	Const_ZERO                   Const = 0
	Const_MAX_REQUEST_HEADER_LEN Const = 1024
)

func (Const) String

func (x Const) String() string

type RequestHeader

type RequestHeader struct {
	Id                         uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Method                     string `protobuf:"bytes,2,opt,name=method" json:"method,omitempty"`
	RawRequestLen              uint32 `protobuf:"varint,3,opt,name=raw_request_len" json:"raw_request_len,omitempty"`
	SnappyCompressedRequestLen uint32 `protobuf:"varint,4,opt,name=snappy_compressed_request_len" json:"snappy_compressed_request_len,omitempty"`
	Checksum                   uint32 `protobuf:"varint,5,opt,name=checksum" json:"checksum,omitempty"`
}

func (*RequestHeader) ProtoMessage

func (*RequestHeader) ProtoMessage()

func (*RequestHeader) Reset

func (m *RequestHeader) Reset()

func (*RequestHeader) String

func (m *RequestHeader) String() string

type ResponseHeader

type ResponseHeader struct {
	Id                          uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Error                       string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"`
	RawResponseLen              uint32 `protobuf:"varint,3,opt,name=raw_response_len" json:"raw_response_len,omitempty"`
	SnappyCompressedResponseLen uint32 `protobuf:"varint,4,opt,name=snappy_compressed_response_len" json:"snappy_compressed_response_len,omitempty"`
	Checksum                    uint32 `protobuf:"varint,5,opt,name=checksum" json:"checksum,omitempty"`
}

func (*ResponseHeader) ProtoMessage

func (*ResponseHeader) ProtoMessage()

func (*ResponseHeader) Reset

func (m *ResponseHeader) Reset()

func (*ResponseHeader) String

func (m *ResponseHeader) String() string

Jump to

Keyboard shortcuts

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