GreetingService.proto 418 Bytes
Newer Older
Michele Fiori's avatar
Michele Fiori committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
syntax = "proto3";
package com.example.grpc;

// Request payload
message HelloRequest {
    string name = 1;
    repeated string hobbies = 2;
}

message HelloResponse {
    string greeting = 1;
}

// Defining a Service, a Service can have multiple RPC operations
service GreetingService {

    rpc greeting(HelloRequest) returns (HelloResponse);

    rpc streamGreeting(HelloRequest) returns (stream HelloResponse);
}