1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-30 08:06:40 +02:00
go-micro/examples/noproto
Asim Aslam d94936f6c9
v3 (#2104)
* v3

* revert plugins

* fixup some issues
2021-01-20 13:54:31 +00:00
..
client v3 (#2104) 2021-01-20 13:54:31 +00:00
main.go v3 (#2104) 2021-01-20 13:54:31 +00:00
README.md Add examples 2020-12-26 15:17:20 +00:00

noproto

This example demonstrates how to use micro without protobuf.

Use micro with standard go types and use the json codec for marshalling. Services have multiple codecs and use the Content-Type header to determine which to use. The client sends Content-Type: application/json. Because we can marshal standard Go types to json there is no code generation or use of protobuf required.

Contents

  • main.go - is a micro greeter service
  • client - is a micro json client

Run the example

Run the service

go run main.go

Run the client

go run client/main.go