Overview
gRPC calls allow you to invoke remote procedure calls on gRPC services, supporting both unary and streaming operations.Properties
The proto resource that describes the gRPC service to call.References a Protocol Buffers (.proto) file that defines the service interface.
The name of the gRPC service to call.Must match a service defined in the proto file.
The hostname of the gRPC service to call.
The port number of the gRPC service to call.
The authentication policy, or the name of the authentication policy, to use when calling the gRPC service.
The name of the gRPC service method to call.Must match a method defined in the specified service.
A name/value mapping of the method call’s arguments, if any.Arguments must match the input message type defined for the method in the proto file.
External Resource
Theproto property references an external resource with:
The endpoint at which to get the proto file.Can be a file:// URI for local files or https:// URI for remote files.
The name, if any, of the defined resource.
Examples
Basic gRPC Call
With Runtime Expression
With Authentication
Remote Proto File
Proto File Format
The proto file should be a valid Protocol Buffers definition:Best Practices
- Version Your Protos: Keep proto files versioned and accessible
- Type Safety: Ensure arguments match the proto message types exactly
- Error Handling: Wrap gRPC calls in try/catch blocks for robust error handling
- Connection Pooling: Runtimes should reuse connections to the same host:port
Related
- HTTP Protocol - For REST-based API calls
- Authentication - Authentication schemes for gRPC calls
- External Resources - How to reference external resources