62 Star 347 Fork 418

infraboard / go-course

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
header.pb.go 12.27 KB
一键复制 编辑 原始数据 按行查看 历史
Mr.Yu 提交于 2021-12-19 20:35 . 调整大纲顺序
// Copyright 2013 <chaishushan{AT}gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.1
// source: codec/pb/header.proto
//
// 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)
//
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Const int32
const (
Const_ZERO Const = 0
Const_MAX_REQUEST_HEADER_LEN Const = 1024
)
// Enum value maps for Const.
var (
Const_name = map[int32]string{
0: "ZERO",
1024: "MAX_REQUEST_HEADER_LEN",
}
Const_value = map[string]int32{
"ZERO": 0,
"MAX_REQUEST_HEADER_LEN": 1024,
}
)
func (x Const) Enum() *Const {
p := new(Const)
*p = x
return p
}
func (x Const) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Const) Descriptor() protoreflect.EnumDescriptor {
return file_codec_pb_header_proto_enumTypes[0].Descriptor()
}
func (Const) Type() protoreflect.EnumType {
return &file_codec_pb_header_proto_enumTypes[0]
}
func (x Const) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Const.Descriptor instead.
func (Const) EnumDescriptor() ([]byte, []int) {
return file_codec_pb_header_proto_rawDescGZIP(), []int{0}
}
type RequestHeader struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
RawRequestLen uint32 `protobuf:"varint,3,opt,name=raw_request_len,json=rawRequestLen,proto3" json:"raw_request_len,omitempty"`
SnappyCompressedRequestLen uint32 `protobuf:"varint,4,opt,name=snappy_compressed_request_len,json=snappyCompressedRequestLen,proto3" json:"snappy_compressed_request_len,omitempty"`
Checksum uint32 `protobuf:"varint,5,opt,name=checksum,proto3" json:"checksum,omitempty"`
}
func (x *RequestHeader) Reset() {
*x = RequestHeader{}
if protoimpl.UnsafeEnabled {
mi := &file_codec_pb_header_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestHeader) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestHeader) ProtoMessage() {}
func (x *RequestHeader) ProtoReflect() protoreflect.Message {
mi := &file_codec_pb_header_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RequestHeader.ProtoReflect.Descriptor instead.
func (*RequestHeader) Descriptor() ([]byte, []int) {
return file_codec_pb_header_proto_rawDescGZIP(), []int{0}
}
func (x *RequestHeader) GetId() uint64 {
if x != nil {
return x.Id
}
return 0
}
func (x *RequestHeader) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *RequestHeader) GetRawRequestLen() uint32 {
if x != nil {
return x.RawRequestLen
}
return 0
}
func (x *RequestHeader) GetSnappyCompressedRequestLen() uint32 {
if x != nil {
return x.SnappyCompressedRequestLen
}
return 0
}
func (x *RequestHeader) GetChecksum() uint32 {
if x != nil {
return x.Checksum
}
return 0
}
type ResponseHeader struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
RawResponseLen uint32 `protobuf:"varint,3,opt,name=raw_response_len,json=rawResponseLen,proto3" json:"raw_response_len,omitempty"`
SnappyCompressedResponseLen uint32 `protobuf:"varint,4,opt,name=snappy_compressed_response_len,json=snappyCompressedResponseLen,proto3" json:"snappy_compressed_response_len,omitempty"`
Checksum uint32 `protobuf:"varint,5,opt,name=checksum,proto3" json:"checksum,omitempty"`
}
func (x *ResponseHeader) Reset() {
*x = ResponseHeader{}
if protoimpl.UnsafeEnabled {
mi := &file_codec_pb_header_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResponseHeader) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResponseHeader) ProtoMessage() {}
func (x *ResponseHeader) ProtoReflect() protoreflect.Message {
mi := &file_codec_pb_header_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ResponseHeader.ProtoReflect.Descriptor instead.
func (*ResponseHeader) Descriptor() ([]byte, []int) {
return file_codec_pb_header_proto_rawDescGZIP(), []int{1}
}
func (x *ResponseHeader) GetId() uint64 {
if x != nil {
return x.Id
}
return 0
}
func (x *ResponseHeader) GetError() string {
if x != nil {
return x.Error
}
return ""
}
func (x *ResponseHeader) GetRawResponseLen() uint32 {
if x != nil {
return x.RawResponseLen
}
return 0
}
func (x *ResponseHeader) GetSnappyCompressedResponseLen() uint32 {
if x != nil {
return x.SnappyCompressedResponseLen
}
return 0
}
func (x *ResponseHeader) GetChecksum() uint32 {
if x != nil {
return x.Checksum
}
return 0
}
var File_codec_pb_header_proto protoreflect.FileDescriptor
var file_codec_pb_header_proto_rawDesc = []byte{
0x0a, 0x15, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x2f, 0x70, 0x62, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65,
0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xbe, 0x01, 0x0a, 0x0d,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a,
0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d,
0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x61, 0x77, 0x5f, 0x72, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d,
0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x65, 0x6e, 0x12, 0x41, 0x0a,
0x1d, 0x73, 0x6e, 0x61, 0x70, 0x70, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73,
0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x1a, 0x73, 0x6e, 0x61, 0x70, 0x70, 0x79, 0x43, 0x6f, 0x6d, 0x70,
0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x65, 0x6e,
0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x22, 0xc1, 0x01, 0x0a,
0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12,
0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x61, 0x77, 0x5f, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x0e, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x65, 0x6e, 0x12,
0x43, 0x0a, 0x1e, 0x73, 0x6e, 0x61, 0x70, 0x70, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65,
0x73, 0x73, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6c, 0x65,
0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1b, 0x73, 0x6e, 0x61, 0x70, 0x70, 0x79, 0x43,
0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x4c, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d,
0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d,
0x2a, 0x2e, 0x0a, 0x05, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x45, 0x52,
0x4f, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x41, 0x58, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45,
0x53, 0x54, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4c, 0x45, 0x4e, 0x10, 0x80, 0x08,
0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x65, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e,
0x66, 0x72, 0x61, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x75, 0x72,
0x73, 0x65, 0x2f, 0x64, 0x61, 0x79, 0x32, 0x31, 0x2f, 0x70, 0x62, 0x72, 0x70, 0x63, 0x2f, 0x63,
0x6f, 0x64, 0x65, 0x63, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_codec_pb_header_proto_rawDescOnce sync.Once
file_codec_pb_header_proto_rawDescData = file_codec_pb_header_proto_rawDesc
)
func file_codec_pb_header_proto_rawDescGZIP() []byte {
file_codec_pb_header_proto_rawDescOnce.Do(func() {
file_codec_pb_header_proto_rawDescData = protoimpl.X.CompressGZIP(file_codec_pb_header_proto_rawDescData)
})
return file_codec_pb_header_proto_rawDescData
}
var file_codec_pb_header_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_codec_pb_header_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_codec_pb_header_proto_goTypes = []interface{}{
(Const)(0), // 0: pb.Const
(*RequestHeader)(nil), // 1: pb.RequestHeader
(*ResponseHeader)(nil), // 2: pb.ResponseHeader
}
var file_codec_pb_header_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_codec_pb_header_proto_init() }
func file_codec_pb_header_proto_init() {
if File_codec_pb_header_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_codec_pb_header_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RequestHeader); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_codec_pb_header_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResponseHeader); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_codec_pb_header_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_codec_pb_header_proto_goTypes,
DependencyIndexes: file_codec_pb_header_proto_depIdxs,
EnumInfos: file_codec_pb_header_proto_enumTypes,
MessageInfos: file_codec_pb_header_proto_msgTypes,
}.Build()
File_codec_pb_header_proto = out.File
file_codec_pb_header_proto_rawDesc = nil
file_codec_pb_header_proto_goTypes = nil
file_codec_pb_header_proto_depIdxs = nil
}
Go
1
https://gitee.com/infraboard/go-course.git
git@gitee.com:infraboard/go-course.git
infraboard
go-course
go-course
19a3f401ff21

搜索帮助