OSDN Git Service

delete miner
[bytom/vapor.git] / vendor / github.com / go-kit / kit / examples / addsvc / README.md
1 # addsvc
2
3 addsvc is an example microservice which takes full advantage of most of Go
4 kit's features, including both service- and transport-level middlewares,
5 speaking multiple transports simultaneously, distributed tracing, and rich
6 error definitions. The server binary is available in cmd/addsvc. The client
7 binary is available in cmd/addcli.
8
9 Finally, the addtransport package provides both server and clients for each
10 supported transport. The client structs bake-in certain middlewares, in order to
11 demonstrate the _client library pattern_. But beware: client libraries are
12 generally a bad idea, because they easily lead to the
13  [distributed monolith antipattern](https://www.microservices.com/talks/dont-build-a-distributed-monolith/).
14 If you don't _know_ you need to use one in your organization, it's probably best
15 avoided: prefer moving that logic to consumers, and relying on 
16  [contract testing](https://docs.pact.io/best_practices/contract_tests_not_functional_tests.html)
17 to detect incompatibilities.