Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 658 Bytes

README.md

File metadata and controls

13 lines (8 loc) · 658 Bytes

1_simple_service

In this example, there is single service named inventory, with two functions:

  • inventory.foo() -> Foo - function without params, returns Foo or error.
  • inventory.bar(Bar) - function accepts Bar object, returns nothing or error.

All that is defined in proto directory.

Code generation

There is Handlers struct defined in gen_server/handlers.go, which contains implementation of different protocol services. If you run go generate in gen_server directory, new file gen_router.go will be generated, which implement jsonrpc.Handler type and has generated code for routing across all the provided implementations.