grpcurl/internal/testing/cmd/bankdemo
Jeff Widman b890db745f
Bump protobuf lib and fix deprecation warnings (#285)
* Bump github.com/golang/protobuf from 1.4.2 to 1.5.2

Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.4.2 to 1.5.2.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.4.2...v1.5.2)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---

* Also pulls along update of golang.google.org/protobuf to v1.26
* Fix deprecation warnings about `ptypes` package
2022-02-04 17:19:52 -05:00
..
README.md fix latest CI breakages by forking code from grpc-go's interop/testing 2020-08-31 14:44:59 -04:00
auth.go use latest version of protoreflect (#212) 2021-02-22 17:32:40 -05:00
bank.go Bump protobuf lib and fix deprecation warnings (#285) 2022-02-04 17:19:52 -05:00
bank.pb.go use latest version of protoreflect (#212) 2021-02-22 17:32:40 -05:00
bank.proto use latest version of protoreflect (#212) 2021-02-22 17:32:40 -05:00
chat.go use latest version of protoreflect (#212) 2021-02-22 17:32:40 -05:00
db.go use latest version of protoreflect (#212) 2021-02-22 17:32:40 -05:00
main.go use latest version of protoreflect (#212) 2021-02-22 17:32:40 -05:00
support.pb.go use latest version of protoreflect (#212) 2021-02-22 17:32:40 -05:00
support.proto use latest version of protoreflect (#212) 2021-02-22 17:32:40 -05:00

README.md

bankdemo

The bankdemo program is an example gRPC server that was used to demo grpcurl at Gophercon 2018.

It demonstrates interesting concepts for building a gRPC server, including chat functionality (that relies on full-duplex bidirectional streams). This code was written specifically to provide an interesting concrete demonstration and, as such, should not be considered in any way production-worthy.

The demo app tracks user accounts, transactions, and balances completely in memory. Every few seconds, as well as on graceful shutdown (like when the server receives a SIGTERM or SIGINT signal), this state is saved to a file named accounts.json, so that the data can be restored if the process restarts.

In addition to bank account data, the server also tracks "chat sessions", for demonstrating bidirectional streams in the form of an application where customers can chat with support agents.