meta

package
v1.1.4-0...-97df346 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2017 License: BSD-2-Clause, BSD-3-Clause, BSL-1.0 Imports: 4 Imported by: 0

Documentation

Overview

Package meta is a generated protocol buffer package.

It is generated from these files:

sofa/pbrpc/rpc_meta.proto
sofa/pbrpc/rpc_option.proto

It has these top-level messages:

RpcMeta

Index

Constants

This section is empty.

Variables

View Source
var CompressType_name = map[int32]string{
	0: "CompressTypeNone",
	1: "CompressTypeGzip",
	2: "CompressTypeZlib",
	3: "CompressTypeSnappy",
	4: "CompressTypeLZ4",
}
View Source
var CompressType_value = map[string]int32{
	"CompressTypeNone":   0,
	"CompressTypeGzip":   1,
	"CompressTypeZlib":   2,
	"CompressTypeSnappy": 3,
	"CompressTypeLZ4":    4,
}
View Source
var E_MethodTimeout = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.MethodOptions)(nil),
	ExtensionType: (*int64)(nil),
	Field:         20000,
	Name:          "sofa.pbrpc.method_timeout",
	Tag:           "varint,20000,opt,name=method_timeout,json=methodTimeout",
	Filename:      "sofa/pbrpc/rpc_option.proto",
}
View Source
var E_RequestCompressType = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.MethodOptions)(nil),
	ExtensionType: (*CompressType)(nil),
	Field:         20001,
	Name:          "sofa.pbrpc.request_compress_type",
	Tag:           "varint,20001,opt,name=request_compress_type,json=requestCompressType,enum=sofa.pbrpc.CompressType,def=0",
	Filename:      "sofa/pbrpc/rpc_option.proto",
}
View Source
var E_ResponseCompressType = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.MethodOptions)(nil),
	ExtensionType: (*CompressType)(nil),
	Field:         20002,
	Name:          "sofa.pbrpc.response_compress_type",
	Tag:           "varint,20002,opt,name=response_compress_type,json=responseCompressType,enum=sofa.pbrpc.CompressType,def=0",
	Filename:      "sofa/pbrpc/rpc_option.proto",
}
View Source
var E_ServiceTimeout = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.ServiceOptions)(nil),
	ExtensionType: (*int64)(nil),
	Field:         20000,
	Name:          "sofa.pbrpc.service_timeout",
	Tag:           "varint,20000,opt,name=service_timeout,json=serviceTimeout,def=10000",
	Filename:      "sofa/pbrpc/rpc_option.proto",
}
View Source
var RpcMeta_Type_name = map[int32]string{
	0: "REQUEST",
	1: "RESPONSE",
}
View Source
var RpcMeta_Type_value = map[string]int32{
	"REQUEST":  0,
	"RESPONSE": 1,
}

Functions

This section is empty.

Types

type CompressType

type CompressType int32
const (
	CompressType_CompressTypeNone   CompressType = 0
	CompressType_CompressTypeGzip   CompressType = 1
	CompressType_CompressTypeZlib   CompressType = 2
	CompressType_CompressTypeSnappy CompressType = 3
	CompressType_CompressTypeLZ4    CompressType = 4
)

func (CompressType) Enum

func (x CompressType) Enum() *CompressType

func (CompressType) EnumDescriptor

func (CompressType) EnumDescriptor() ([]byte, []int)

func (CompressType) String

func (x CompressType) String() string

func (*CompressType) UnmarshalJSON

func (x *CompressType) UnmarshalJSON(data []byte) error

type RpcMeta

type RpcMeta struct {
	Type *RpcMeta_Type `protobuf:"varint,1,req,name=type,enum=sofa.pbrpc.RpcMeta_Type" json:"type,omitempty"`
	// Message sequence id.
	SequenceId *uint64 `protobuf:"varint,2,req,name=sequence_id,json=sequenceId" json:"sequence_id,omitempty"`
	// Method full name.
	// For example: "test.HelloService.GreetMethod"
	Method *string `protobuf:"bytes,100,opt,name=method" json:"method,omitempty"`
	// Server timeout in milli-seconds.
	ServerTimeout *int64 `protobuf:"varint,101,opt,name=server_timeout,json=serverTimeout" json:"server_timeout,omitempty"`
	// Set as true if the call is failed.
	Failed *bool `protobuf:"varint,200,opt,name=failed" json:"failed,omitempty"`
	// The error code if the call is failed.
	ErrorCode *int32 `protobuf:"varint,201,opt,name=error_code,json=errorCode" json:"error_code,omitempty"`
	// The error reason if the call is failed.
	Reason *string `protobuf:"bytes,202,opt,name=reason" json:"reason,omitempty"`
	// Set the request/response compress type.
	CompressType *CompressType `protobuf:"varint,300,opt,name=compress_type,json=compressType,enum=sofa.pbrpc.CompressType" json:"compress_type,omitempty"`
	// Set the response compress type of user expected.
	ExpectedResponseCompressType *CompressType `` /* 174-byte string literal not displayed */
	XXX_unrecognized             []byte        `json:"-"`
}

func (*RpcMeta) Descriptor

func (*RpcMeta) Descriptor() ([]byte, []int)

func (*RpcMeta) GetCompressType

func (m *RpcMeta) GetCompressType() CompressType

func (*RpcMeta) GetErrorCode

func (m *RpcMeta) GetErrorCode() int32

func (*RpcMeta) GetExpectedResponseCompressType

func (m *RpcMeta) GetExpectedResponseCompressType() CompressType

func (*RpcMeta) GetFailed

func (m *RpcMeta) GetFailed() bool

func (*RpcMeta) GetMethod

func (m *RpcMeta) GetMethod() string

func (*RpcMeta) GetReason

func (m *RpcMeta) GetReason() string

func (*RpcMeta) GetSequenceId

func (m *RpcMeta) GetSequenceId() uint64

func (*RpcMeta) GetServerTimeout

func (m *RpcMeta) GetServerTimeout() int64

func (*RpcMeta) GetType

func (m *RpcMeta) GetType() RpcMeta_Type

func (*RpcMeta) ProtoMessage

func (*RpcMeta) ProtoMessage()

func (*RpcMeta) Reset

func (m *RpcMeta) Reset()

func (*RpcMeta) String

func (m *RpcMeta) String() string

type RpcMeta_Type

type RpcMeta_Type int32

Message type.

const (
	RpcMeta_REQUEST  RpcMeta_Type = 0
	RpcMeta_RESPONSE RpcMeta_Type = 1
)

func (RpcMeta_Type) Enum

func (x RpcMeta_Type) Enum() *RpcMeta_Type

func (RpcMeta_Type) EnumDescriptor

func (RpcMeta_Type) EnumDescriptor() ([]byte, []int)

func (RpcMeta_Type) String

func (x RpcMeta_Type) String() string

func (*RpcMeta_Type) UnmarshalJSON

func (x *RpcMeta_Type) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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