From f4911e95819cdf10075daab1beeaaa1c148fe015 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Sun, 20 Nov 2022 15:49:08 +0700 Subject: [PATCH] feat: find way to dump grpc-go --- docs/2022-07-31-experiment-go.html | 2 +- posts/2022-07-31-experiment-go.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/2022-07-31-experiment-go.html b/docs/2022-07-31-experiment-go.html index ad6a0cb..b78e0fd 100644 --- a/docs/2022-07-31-experiment-go.html +++ b/docs/2022-07-31-experiment-go.html @@ -26,4 +26,4 @@ type ClientAccount interface { // c is Client c.User.Get() c.Account.Remove() -

The difference is c.GetUser() -> c.User.Get().

For example we have client which connect to bank.
There are many functions like GetUser, GetTransaction, VerifyAccount, ...
So split big client to many children, each child handle single aspect, like user or transaction.

My concert is we replace an interface with a struct which contains multiple interfaces aka children.
I don't know if this is the right call.

This pattern is used by google/go-github.

Thanks

Feel free to ask me via email \ No newline at end of file +

The difference is c.GetUser() -> c.User.Get().

For example we have client which connect to bank.
There are many functions like GetUser, GetTransaction, VerifyAccount, ...
So split big client to many children, each child handle single aspect, like user or transaction.

My concert is we replace an interface with a struct which contains multiple interfaces aka children.
I don't know if this is the right call.

This pattern is used by google/go-github.

Find alternative to grpc/grpc-go

Why?
See for yourself

Currently there are 2:

Thanks

Feel free to ask me via email \ No newline at end of file diff --git a/posts/2022-07-31-experiment-go.md b/posts/2022-07-31-experiment-go.md index 775959d..87a0eed 100644 --- a/posts/2022-07-31-experiment-go.md +++ b/posts/2022-07-31-experiment-go.md @@ -54,6 +54,16 @@ I don't know if this is the right call. This pattern is used by [google/go-github](https://github.com/google/go-github). +## Find alternative to [grpc/grpc-go](https://github.com/grpc/grpc-go) + +Why? +[See for yourself](https://github.com/grpc/grpc-go/issues?q=is%3Aissue+compatibility+is%3Aclosed) + +Currently there are 2: + +- [bufbuild/connect-go](https://github.com/bufbuild/connect-go). Comming from buf, trust worthy but need time to make it match feature parity with grpc-go. +- [twitchtv/twirp](https://github.com/twitchtv/twirp) + # Thanks - [API Clients for Humans](https://blog.gopheracademy.com/advent-2019/api-clients-humans/)