Get desktop application:
View/edit binary Protocol Buffers messages
Request protocol header
Protocol version Specific value corresponds to TrpcProtoVersion
Call type of request eg: normal call, one-way call Specific value corresponds to TrpcCallType
Request unique id
Request timeout, unit ms
Name of the calling service Standard format in trpc protocol: trpc.application_name.server_name.proto_service_name, 4 segments
Routing name of the called service Standard format in trpc protocol: trpc.application_name.server_name.proto_service_name[.interface_name] First 4 segments are mandatory, interface is optional
Interface name of the called service Standard format: /package.Service_name/interface_name
Message type for framework information transparent transmission Such as tracing, dyeing key, gray, authentication, multi-environment, set name, etc. Specific value corresponds to TrpcMessageType
Key-value pairs for framework transparent transmission information, currently divided into two parts: 1. Information to be transparently transmitted by the framework layer, key names must start with 'trpc-' 2. Information to be transparently transmitted by the business layer, which can be set by the business itself
Serialization type of request data eg: proto/jce/json, default proto Specific value corresponds to TrpcContentEncodeType
Compression method used for request data eg: gzip/snappy/..., default not used Specific value corresponds to TrpcCompressType
Response protocol header
Protocol version Specific value corresponds to TrpcProtoVersion
Call type of request eg: normal call, one-way call Specific value corresponds to TrpcCallType
Request unique id
Error return code at framework layer Specific value corresponds to TrpcRetCode
Interface error return code It is recommended to identify success and failure when using, 0 represents success, others represent failure
Call result information description Used when failed
Message type for framework information transparent transmission Such as tracing, dyeing key, gray, authentication, multi-environment, set name, etc. Specific value corresponds to TrpcMessageType
Key-value pairs for framework transparent transmission information returned, Currently divided into two parts: 1. Information transparently transmitted back by the framework layer, key names must start with 'trpc-' 2. Information transparently transmitted back by the business layer, which can be set by the business itself
Encoding type of response data eg: proto/jce/json, default proto Specific value corresponds to TrpcContentEncodeType
Compression method used for response data eg: gzip/snappy/..., default not used Specific value corresponds to TrpcCompressType
Used in:
to gen swagger json
Call type in trpc protocol
Request-response call, including synchronous and asynchronous
One-way call
Compression type of data content in trpc protocol Default uses no compression
Default no compression
Use gzip
Use snappy Deprecated: It is recommended to use TRPC_SNAPPY_STREAM_COMPRESS/TRPC_SNAPPY_BLOCK_COMPRESS, because currently trpc-go and trpc-cpp use stream and block modes respectively, which are incompatible, cross-language calls will cause errors
Use zlib
Use snappy in stream mode
Use snappy in block mode
Encoding type of data content in trpc protocol Default uses pb Currently agreed that values in the range 0-127 are framework-standard serialization methods, used by framework
pb
jce
json
flatbuffer
No serialization
xml
thrift
The binary data frame type of the trpc protocol Currently supports two types of binary data frames: 1. Binary data frame type for request-response mode 2. Binary data frame type for streaming mode
Binary data frame type for trpc request-response mode
Binary data frame type for trpc streaming mode
The magic value in the framework protocol header
trpc does not use this value, it is used by the pb tool to generate code
trpc protocol uses this magic value by default
Message transparent transmission supported types in trpc protocol
trpc does not use this value, it is used by the pb tool to generate code
Dyeing
Tracing
Multi-environment
Gray
Set name
trpc protocol version
Default version
Definition of framework layer interface call return codes
Call success
Protocol error codes Server-side decode error
Server-side encode error
Service or func routing error codes Server does not have corresponding service implementation
Server does not have corresponding interface implementation
Timeout/overload/limiter error codes Request timed out on server
Request discarded due to server overload protection Mainly used in framework's internal overload protection plugin
Request limited on server Mainly used in external service governance system plugins or business custom limiter plugins, eg: Polaris limiter
Request timed out on server due to full link timeout
Server system error
Server authentication failure error
Server request parameter automatic validation failure error
Timeout error codes Request timed out on client
Request timed out on client due to full link timeout
Network related error codes Client connection error
Protocol related error codes Client encode error
Client decode error
Overload protection/limiter related error codes Request limited on client Mainly used in external service governance system plugins or business custom limiter plugins, eg: Polaris limiter
Request discarded due to client overload protection Mainly used in framework's internal overload protection plugin
Routing related error codes Client IP routing error
Client network error
Client response parameter automatic validation failure error
Upstream actively disconnected, early cancellation request error
Server-side streaming network error, detailed error codes need to be sorted out during implementation
Server-side streaming transmission error, detailed error codes need to be sorted out during implementation eg: Stream message too large, etc.
Server-side streaming encode error
Client-side streaming encode/decode error
Server-side streaming write error, detailed error codes need to be sorted out during implementation
Server-side streaming read error, detailed error codes need to be sorted out during implementation
Client-side streaming network error, detailed error codes need to be sorted out during implementation
Client-side streaming transmission error, detailed error codes need to be sorted out during implementation eg: Stream message too large, etc.
Client-side streaming encode error
Client-side streaming encode/decode error
Client-side streaming write error, detailed error codes need to be sorted out during implementation
Client-side streaming read error, detailed error codes need to be sorted out during implementation
Unspecified error
Unspecified error
Definition of RESET frame header message for trpc streaming
Close type, whether to close one end or all
Close return code Represents framework layer error
Close information description
Message type for framework information transparent transmission Such as tracing, dyeing key, gray, authentication, multi-environment, set name, etc. Specific value corresponds to TrpcMessageType
Key-value pairs for framework transparent transmission information, currently divided into two parts: 1. Information to be transparently transmitted by the framework layer, key names must start with 'trpc-' 2. Information to be transparently transmitted by the business layer, which can be set by the business itself
Interface error return code It is recommended to identify success and failure when using, 0 represents success, others represent failure
trpc streaming close type
Normal unidirectional stream close
Abnormal bidirectional stream close
Definition of flow control frame header metadata for trpc streaming
Incremented window size
The binary data frame type of trpc protocol streaming Currently there are 4 types of streaming frames: INIT/DATA/FEEDBACK/CLOSE, where CLOSE frame does not carry business data INIT frame: FIXHEADER + TrpcStreamInitMeta DATA frame: FIXHEADER + body(business serialized data) FEEDBACK frame: FIXHEADER + TrpcStreamFeedBackMeta (trigger strategy: high/low water level + timer) CLOSE frame: FIXHEADER + TrpcStreamCloseMeta Connection and stream idle timeout recycling mechanism is not considered
Default value for request-response
Streaming INIT frame type
Streaming DATA frame type
Streaming FEEDBACK frame type
Streaming CLOSE frame type
Definition of flow control frame header message for trpc streaming
INIT request metadata
INIT response metadata
Initial send window size notified by receiver to sender
Serialization type of request data eg: proto/jce/json, default proto Specific value corresponds to TrpcContentEncodeType
Compression method used for request data eg: gzip/snappy/..., default not used Specific value corresponds to TrpcCompressType
Request metadata definition for trpc streaming INIT header
Used in:
Name of the calling service Standard format in trpc protocol: trpc.application_name.server_name.proto_service_name, 4 segments
Routing name of the called service Standard format in trpc protocol: trpc.application_name.server_name.proto_service_name[.interface_name] First 4 segments are mandatory, interface is optional
Interface name of the called service Standard format: /package.Service_name/interface_name
Message type for framework information transparent transmission Such as tracing, dyeing key, gray, authentication, multi-environment, set name, etc. Specific value corresponds to TrpcMessageType
Key-value pairs for framework transparent transmission information, currently divided into two parts: 1. Information to be transparently transmitted by the framework layer, key names must start with 'trpc-' 2. Information to be transparently transmitted by the business layer, which can be set by the business itself Note: Key-value pairs in trans_info will be transparently transmitted through the entire link, please use with caution!
Response metadata definition for trpc streaming INIT header
Used in:
Error return code at framework layer Specific value corresponds to TrpcRetCode
Call result information description Used when failed