All Products
Search
Document Center

Alibaba Cloud Service Mesh:Description of ASMGrpcJsonTranscoder fields

Last Updated:Nov 28, 2023

ASMGrpcJsonTranscoder is used for transcoding between HTTP/JSON and gRPC/Protobuf. This topic describes the fields of ASMGrpcJsonTranscoder.

Field description

Field

Type

Required

Description

workloadSelector

map<string, string>

Yes

One or more labels that specify a set of pods on which the configurations take effect. The scope of label search is restricted to the namespace in which the resource resides. For more information, see Workload Selector.

isGateway

bool

No

Specifies whether to apply the configurations to a gateway. The value true indicates that the configurations apply to the gateway. Default value: false.

portNumber

int

Yes

The corresponding service port. If the configurations apply to a gateway, this field specifies the service port (such as 8080) that performs transcoding on the gateway.

services

string[]

Yes

The services that the configurations declare in the Proto file in the {Package name}.{Service name} format. Example:

services:
 - 'helloworld.Greeter'

protoDescriptorBin

string

Yes

The Base64-encoded content of the Proto Descriptor file. Note that the value of this field must be Base64-encoded.

References

Use ASMGrpcJsonTranscoder to allow HTTP/JSON requests to access gRPC services in an ASM instance