gRPC Transcode Configuration
Parameters
See plugin common configurations for configuration options available to all plugins.
-
proto_id—string or integer· requiredID of the APISIX proto resource, which contains the protocol buffer definitions.
-
service—string· requiredName of the gRPC service.
-
method—string· requiredMethod name of the gRPC service.
-
deadline—number· optional · default:0Deadline for the gRPC service in ms. This is the time APISIX will wait for a gRPC call to complete.
-
pb_option—array[string]· optional · default:["enum_as_name", "int64_as_number", "auto_default_values", "disable_hooks"]Encoder and decoder options. The option can be configured as an array of one or more of the below values:
For enum as result:
enum_as_name,enum_as_valueFor int64 as result:
int64_as_number,int64_as_string,int64_as_hexstringFor default values:
auto_default_values,no_default_values,use_default_values,use_default_metatableFor hooks:
enable_hooks,disable_hooks -
show_status_in_body—boolean· optional · default:falseIf true, display the parsed
grpc-status-details-binin the response body. -
status_detail_type—string· optionalThe message type corresponding to the details part of
grpc-status-details-bin. If not specified, the error message will not be decoded. -
max_resp_body_size—integer· optional · default:67108864Valid values: greater than or equal to 1
Maximum response body size in bytes buffered for transcoding. A larger response is truncated to this size before transcoding. The chunk that crosses the threshold is buffered before the limit is enforced, so transient memory use can exceed the configured size. Introduced in API7 Enterprise 3.9.17 and 3.10.4, and APISIX 3.18.0.