{"id":28961376,"url":"https://github.com/belltoy/etcdgun","last_synced_at":"2025-09-13T00:33:56.298Z","repository":{"id":299237372,"uuid":"1002427839","full_name":"belltoy/etcdgun","owner":"belltoy","description":"An etcd client built on top of gun and egrpc.","archived":false,"fork":false,"pushed_at":"2025-06-23T09:05:56.000Z","size":350,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-23T09:26:06.361Z","etag":null,"topics":["erlang","etcd","etcd-client","etcdv3"],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/belltoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2025-06-15T13:05:43.000Z","updated_at":"2025-06-23T09:09:43.000Z","dependencies_parsed_at":"2025-06-15T14:43:22.320Z","dependency_job_id":"146e97e8-f6f1-4f3a-8303-7bd4f02f27ec","html_url":"https://github.com/belltoy/etcdgun","commit_stats":null,"previous_names":["belltoy/etcdgun"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/belltoy/etcdgun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belltoy%2Fetcdgun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belltoy%2Fetcdgun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belltoy%2Fetcdgun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belltoy%2Fetcdgun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belltoy","download_url":"https://codeload.github.com/belltoy/etcdgun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belltoy%2Fetcdgun/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261589908,"owners_count":23181434,"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":["erlang","etcd","etcd-client","etcdv3"],"created_at":"2025-06-24T02:02:40.056Z","updated_at":"2025-09-13T00:33:56.286Z","avatar_url":"https://github.com/belltoy.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"An etcd client built on top of [gun](https://github.com/ninenines/gun) and [egrpc](https://github.com/belltoy/egrpc).\n\n## Features\n\n- [x] etcd v3 gRPC APIs.\n    - `etcdserverpb.KV`\n    - `etcdserverpb.Watch`\n    - `etcdserverpb.Lease`\n    - `etcdserverpb.Auth`\n    - `etcdserverpb.Cluster`\n    - `etcdserverpb.Maintenance`\n- [x] etcd v3 concurrency gRPC APIs.\n    - `v3electionpb.Election`\n    - `v3lockpb.Lock`\n- [x] gRPC health v1 API (via [`egrpc`](https://github.com/belltoy/grpc))\n- [x] unary and streaming [interceptors](src/interceptors/) for more flexible needs.\n- [x] etcd authentication and auto-token-refreshing.\n- [x] lease keep alive [`etcdgun_lease_keepalive`](src/etcdgun_lease_keepalive.erl).\n- [x] watcher with auto-reconnect [`etcdgun_watcher`](src/etcdgun_watcher.erl).\n- [x] auth-check etcd member list [`etcdgun_membership`](src/etcdgun_membership.erl).\n- [x] etcd endpoints health check when dial.\n- [ ] health check for active channels in interval.\n- [ ] idle connection keep alive?\n\nGenerating etcd v3 API codes via the proto files in etcd v3.5.10, without changing their packets.\n\nExtract `ResponseHeader` from `rpc.proto` into `response_header.proto` to avoid [gpb](https://hex.pm/packages/gpb) to generate the\nsame structure in multiple output pb modules.\n\n## Client APIs\n\n### Starting Client\n\n```erlang\nClient = foo,\nOpts = #{},\n{ok, _Pid} = etcdgun:open(my_client, [{\"127.0.0.1\", 2379}], Opts),\n\n% Now you can use `my_client` to pick channels and call the etcd gRPC APIs.\n{ok, Channel} = etcdgun_client:pick_channel(my_client).\n{ok, #{header := _, members := Members}} = etcdgun_etcdserverpb_cluster_client:member_list(Channel, #{}).\n\n{ok,#{status =\u003e 'SERVING'}} = egrpc_grpc_health_v1_health_client:check(Channel, #{}).\n```\n\n### Client Options\n\nSee `etcdgun:opts()` for the available options.\n\nSupport unary interceptors and streaming interceptors.\n\n### API Call\n\n\n## Development\n\n```bash\n# Generate pb modules\nrebar3 protobuf compile\n\n# Generate the etcd gRPC client code\nrebar3 egrpc gen\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelltoy%2Fetcdgun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelltoy%2Fetcdgun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelltoy%2Fetcdgun/lists"}