{"id":17261320,"url":"https://github.com/takama/grpc","last_synced_at":"2026-05-09T04:34:00.398Z","repository":{"id":83313629,"uuid":"165021374","full_name":"takama/grpc","owner":"takama","description":"gRPC client, service and CLI utility to provide/check load balancing and connection stability","archived":false,"fork":false,"pushed_at":"2023-07-05T20:56:33.000Z","size":214,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-02T10:57:14.025Z","etag":null,"topics":["balancing","grpc","kubernetes","retry","stability","timeout"],"latest_commit_sha":null,"homepage":"","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/takama.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","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":"2019-01-10T08:30:56.000Z","updated_at":"2023-06-02T04:20:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"e889efbc-e82d-48b2-a40d-3e05049ca4cf","html_url":"https://github.com/takama/grpc","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/takama/grpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takama%2Fgrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takama%2Fgrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takama%2Fgrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takama%2Fgrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takama","download_url":"https://codeload.github.com/takama/grpc/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takama%2Fgrpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["balancing","grpc","kubernetes","retry","stability","timeout"],"created_at":"2024-10-15T07:50:45.518Z","updated_at":"2026-05-09T04:34:00.369Z","avatar_url":"https://github.com/takama.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# gRPC Go client with advanced settings\n\ngRPC client, service and CLI utility to provide/check load balancing and connection stability\n\n## Using gRPC Go client\n\n```go\nimport \"github.com/takama/grpc/client\"\n...\n\nc, err := client.New(cfg, log)\nif err != nil {\n    log.Fatal(err)\n}\n\nctx, cancel := context.WithTimeout(context.Background(), time.Second*15)\ndefer cancel()\n\ne := echo.NewEchoClient(c.Connection())\nresponse, err := e.Ping(\n    // This is important to pass trough c.Context(ctx)\n    // when we use Envoy balancer for any retries\n    c.Context(ctx),\n    \u0026echo.Request{\n        Content: \"Some content\",\n    },\n)\nif err != nil {\n    log.Print(err)\n}\n\nfmt.Print(\"Response:\", response.Content)\n```\n\n## Prepare service environment and configuration\n\n- Create a new project and GKE cluster in Google Cloud\n- Setup Contour balancer according to [example](https://github.com/projectcontour/contour/tree/master/examples/contour)\n- Note somewhere the IP of Load balancer\n- Change default GKE values in `Makefile` on your own\n\n```Makefile\nGKE_PROJECT_ID ?= your-project-id\nGKE_PROJECT_ZONE ?= europe-west1-b\nGKE_CLUSTER_NAME ?= your-cluster-name\n```\n\n- Choose domain host name for the service and point your DNS record on GKE Contour balancer using IP above\n- Make the certificates for the domain name (Let's encrypt as option)\n- Test to create in dry run  `grpc-service-tls` in corresponded Kubernetes environment (ex: `test`)\n\n```sh\nkubectl create secret tls grpc-service-tls --key key.pem --cert cert.pem --dry-run -o yaml\n```\n\n- Create `grpc-service-tls` in corresponded Kubernetes environment (ex: `test`)\n\n```sh\nkubectl create secret tls grpc-service-tls --key key.pem --cert cert.pem\n```\n\n- Change domain name in `.helm/values-test.yaml` or any other `values-name.yaml` to your own\n\n```yaml\n  ## Ingress route hosts\n  ##\n  hosts:\n    ## gRPC service host\n    - name: grpc\n      host: grpc.your-test-domain.net\n...\n  ## Client connection to the service\n  ##\n  client:\n    host: grpc.your-test-domain.net\n```\n\n- Change default namespace in `Makefile`\n\n```Makefile\n# Namespace: dev, prod, username ...\nNAMESPACE ?= test\n```\n\n## Build the service\n\n```sh\nmake build\n```\n\n## Deploy the service\n\n```sh\nmake deploy\n```\n\n## Build CLI utility on Linux\n\n```sh\nmake compile\n```\n\n## Build CLI utility on Mac OS\n\n```sh\nGOOS=darwin make compile\n```\n\n## Run the utility with simple ping\n\n```sh\n./bin/darwin-amd64/grpc client ping --count 600 --config config/test.conf\n```\n\n## Run the utility with reverse ping\n\n```sh\n./bin/darwin-amd64/grpc client reverse --count 600 --config config/test.conf\n```\n\n## Scale services\n\nDuring the ping process scale services from 1 to N and see how it is going\n\n```sh\nkubectl scale --replicas 3 -n test deploy/grpc\nkubectl scale --replicas 6 -n test deploy/grpc\nkubectl scale --replicas 1 -n test deploy/grpc\n...\n```\n\n## Other make commands\n\n- `all` - run default complete set of commands (build the service)\n- `vendor` - import all vendors (using dep)\n- `compile` - build the service binary\n- `certs` - download latests certs from an alpine image and prepare it for service container\n- `build` - build container image\n- `push` - push an image in docker registry\n- `run` - build and run the service\n- `logs` - show service logs from container\n- `deploy` - deployment of the service into Kubernetes environment\n- `charts` - validate helm templates (charts)\n- `test` - run unit tests\n- `cover` - show testing coverage for packages\n- `fmt` - format Go packages with go fmt\n- `lint` - use set of linters ( ~ 20) to check the service code\n- `stop` - stop running container\n- `start` - start existing container (if it was stopped before)\n- `rm` - remove stopped container\n- `version` - add next major/minor/patch version\n- `clean` - remove binary and running container\n- `bootstrap` - check and setup if something from utilities is not exist\n\n## Versioned changes\n\nAll changes in the project described in [changelog](docs/CHANGELOG.md)\n\n_Generated using ([Caldera boilerplate](https://github.com/takama/caldera))_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakama%2Fgrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakama%2Fgrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakama%2Fgrpc/lists"}