module GRPC::GenericService::Dsl

Provides a simple DSL to describe RPC services.

E.g, a Maths service that uses the serializable messages DivArgs, DivReply and Num might define its endpoint uses the following way:

rpc :div DivArgs, DivReply # single request, single response rpc :sum stream(Num), Num # streamed input, single response rpc :fib FibArgs, stream(Num) # single request, streamed response rpc :div_many stream(DivArgs), stream(DivReply)

# streamed req and resp

Each ‘rpc’ adds an RpcDesc to classes including this module, and assert_rpc_descs_have_methods is used to ensure the including class provides methods with signatures that support all the descriptors.