In the gRPC Federation, you can use by
to write CEL(Common Expression Language) expressions.
For more information on CEL, please see here.
Here is a list of macros that CEL supports by default.
In addition to the standard CEL operations, the gRPC Federation supports a number of its own APIs. This page introduces those APIs.
- grpc.federation.list APIs
- grpc.federation.rand APIs
- grpc.federation.time APIs
- grpc.federation.uuid APIs
- grpc.federation.log APIs
- grpc.federation.enum APIs
If you have defined variables using def
feature, you can use them in CEL.
Also, the message argument should be $.
can be used to refer to them.
error
is a reserved word. The error
variable is used to represent errors in gRPC method calls.
The type of the error
variable is defined here.
if: "error.precondition_failures[0].violations[0].subject == 'subject value'"
field | type |
---|---|
code |
int32 |
message |
string |
details |
repeated google.protobuf.Any |
custom_messages |
repeated google.protobuf.Any |
error_info |
repeated google.rpc.ErrorInfo |
retry_info |
repeated google.rpc.RetryInfo |
debug_info |
repeated google.rpc.DebugInfo |
quota_failures |
repeated google.rpc.QuotaFailure |
precondition_failures |
repeated google.rpc.PreconditionFailure |
bad_requests |
repeated google.rpc.BadRequest |
request_info |
repeated google.rpc.RequestInfo |
resource_info |
repeated google.rpc.ResourceInfo |
helps |
repeated google.rpc.Help |
localized_messages |
repeated google.rpc.LocalizedMessage |