Skip to content

Service

In Bebop a service defines an aggregate of methods that can be called by a client.

There are for different types of service methods:

  • unary - a single request and response
service Greeter {
sayHello(MyRequest): MyResponse ;
}
  • server streaming - a single request and a stream of responses from the server
service Greeter {
sayHello(MyRequest): stream MyResponse;
}
  • client streaming - a stream of requests and a single response from the server
service Greeter {
sayHello(stream MyRequest): MyResponse;
}
  • duplex streaming - a stream of requests and a stream of responses from the server
service Greeter {
sayHello(stream MyRequest): stream MyResponse;
}

Code Generation

Tempo is the offical RPC library for Bebop.

When the compiler emits code related to services, it will do so to match the implementation of Tempo in the target language.

For more information see the Tempo documentation.

To control the types of service code that are generated (client vs. server) you can use