{"id":19926521,"url":"https://github.com/pahanini/go-grpc-bidirectional-streaming-example","last_synced_at":"2025-09-02T22:38:56.384Z","repository":{"id":37367208,"uuid":"112436203","full_name":"pahanini/go-grpc-bidirectional-streaming-example","owner":"pahanini","description":"gRPC bidirectional streaming example written in golang","archived":false,"fork":false,"pushed_at":"2024-07-11T17:39:24.000Z","size":61,"stargazers_count":117,"open_issues_count":1,"forks_count":34,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T06:16:24.311Z","etag":null,"topics":["bidirectional","context","demo","example","golang","grpc","streaming","tutorial"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pahanini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-29T06:28:51.000Z","updated_at":"2024-11-26T20:06:40.000Z","dependencies_parsed_at":"2024-06-18T21:30:11.690Z","dependency_job_id":"cc3456a5-963b-402a-9a38-d549e83e0b4b","html_url":"https://github.com/pahanini/go-grpc-bidirectional-streaming-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pahanini%2Fgo-grpc-bidirectional-streaming-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pahanini%2Fgo-grpc-bidirectional-streaming-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pahanini%2Fgo-grpc-bidirectional-streaming-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pahanini%2Fgo-grpc-bidirectional-streaming-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pahanini","download_url":"https://codeload.github.com/pahanini/go-grpc-bidirectional-streaming-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233574881,"owners_count":18696523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bidirectional","context","demo","example","golang","grpc","streaming","tutorial"],"created_at":"2024-11-12T22:29:33.412Z","updated_at":"2025-01-12T07:07:54.891Z","avatar_url":"https://github.com/pahanini.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang gRPC bidirectional streaming example\n\n- client sends random numbers to server\n- server receives number and sends it back if the number greater than all previous numbers\n- both client and server handle context errors (try to close client during send)\n\n## Requirements\n\n- go 1.17.1\n- protobuf installed\n- go support for protobuf installed\n\n## Installation\n\n### MacOS\n\n```bash\nbrew install go\nbrew install protobuf\ngo install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1\n```\n\nMake sure ```protoc-gen-go``` added in PATH\n\nTo add it to PATH you can use bash profile for example.\n\nEdit ```vim ~/.bash_profile```, add: ```export PATH=\"$PATH:$(go env GOPATH)/bin\"```, run ```source ~/.bash_profile``` \nto apply changes.\n\n### Linux\n\nTBD\n\n## Complie\n\n```bash\nmake all\n```\n\nIt should create two binaries `server` and `client`\n\n## Use\n\nStart server `./server` and in other terminal start `./client`\n\nClient output example:\n\n```bash\n./client\n2017/12/01 14:16:54 0 sent\n2017/12/01 14:16:54 1 sent\n2017/12/01 14:16:54 new max 1 received\n2017/12/01 14:16:55 2 sent\n2017/12/01 14:16:55 new max 2 received\n2017/12/01 14:16:55 0 sent\n2017/12/01 14:16:55 0 sent\n2017/12/01 14:16:55 4 sent\n2017/12/01 14:16:55 new max 4 received\n2017/12/01 14:16:55 0 sent\n2017/12/01 14:16:56 6 sent\n2017/12/01 14:16:56 new max 6 received\n2017/12/01 14:16:56 3 sent\n2017/12/01 14:16:56 2 sent\n2017/12/01 14:16:56 finished with max=6\n```\n\nServer output:\n\n```bash\n./server\n2017/12/01 14:16:54 start new server\n2017/12/01 14:16:54 send new max=1\n2017/12/01 14:16:55 send new max=2\n2017/12/01 14:16:55 send new max=4\n2017/12/01 14:16:56 send new max=6\n2017/12/01 14:16:56 exit\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpahanini%2Fgo-grpc-bidirectional-streaming-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpahanini%2Fgo-grpc-bidirectional-streaming-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpahanini%2Fgo-grpc-bidirectional-streaming-example/lists"}