gRPC Requests
Vegha can call gRPC services directly. It supports unary calls and all three streaming modes, with method definitions supplied either from a .proto file or via server reflection.
Describing the service
Section titled “Describing the service”Vegha needs to know the service’s methods and message shapes before it can call them. You can provide this in two ways:
| Source | When to use |
|---|---|
.proto file | You have the protocol definition files locally. |
| Server reflection | The server exposes the gRPC reflection service. |
Once the service description is loaded, the available methods become selectable for the request.
Call types
Section titled “Call types”Vegha supports every gRPC call type:
| Type | Client sends | Server sends |
|---|---|---|
| Unary | One message | One message |
| Server-streaming | One message | A stream of messages |
| Client-streaming | A stream of messages | One message |
| Bidirectional | A stream of messages | A stream of messages |
Sending messages
Section titled “Sending messages”For a unary call, compose the request message and send it. For streaming calls, Vegha lets you send messages on the stream interactively:
- Server-streaming — send the initial message, then read messages as the server emits them.
- Client-streaming — send multiple messages, then close the stream to receive the server’s single response.
- Bidirectional — send and receive messages independently while the call is open.
Messages are composed as structured data matching the message type from the .proto definition.
Metadata
Section titled “Metadata”gRPC metadata is the gRPC equivalent of HTTP headers. Add metadata key/value pairs to the request to send values such as authorization tokens or request identifiers along with the call.
Variables
Section titled “Variables”{{variable}} interpolation works in the service address, metadata, and message fields, so you can parameterize gRPC requests the same way you do HTTP requests. See Variables.