-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgreeter.bop
49 lines (44 loc) · 1.37 KB
/
greeter.bop
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* `HelloRequest` is a struct representing a request to the Greeter service.
*/
struct HelloRequest {
/**
* The name to be used in the greeting.
* It is of type string.
*/
string name;
}
/**
* `HelloResponse` is a struct representing the response from the Greeter service.
*/
struct HelloResponse {
/**
* The greeting message generated by the service.
* It is of type string.
*/
string serviceMessage;
}
/**
* `Greeter` is a service that provides methods for generating greeting messages.
*/
service Greeter {
/**
* `sayHello` is a method that takes a `HelloRequest` and returns a `HelloResponse`.
*/
sayHello(HelloRequest): HelloResponse;
/**
* `sayHelloClient` is a method that takes a stream of `HelloRequest` and returns a `HelloResponse`.
* It is used for client-side streaming.
*/
sayHelloClient(stream HelloRequest): HelloResponse;
/**
* `sayHelloServer` is a method that takes a `HelloRequest` and returns a stream of `HelloResponse`.
* It is used for server-side streaming.
*/
sayHelloServer(HelloRequest): stream HelloResponse;
/**
* `sayHelloDuplex` is a method that takes a stream of `HelloRequest` and returns a stream of `HelloResponse`.
* It is used for bidirectional streaming.
*/
sayHelloDuplex(stream HelloRequest): stream HelloResponse;
}