{"id":23074498,"url":"https://github.com/iamazeem/go-grpc-test","last_synced_at":"2026-04-26T23:31:51.815Z","repository":{"id":170296831,"uuid":"646056586","full_name":"iamazeem/go-grpc-test","owner":"iamazeem","description":"Go GRPC Test - sample DNS client and server apps","archived":false,"fork":false,"pushed_at":"2024-04-19T12:15:37.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-16T08:34:50.522Z","etag":null,"topics":["go","golang","grpc","grpc-client","grpc-go","grpc-server"],"latest_commit_sha":null,"homepage":"https://github.com/iamazeem/go-grpc-test","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/iamazeem.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}},"created_at":"2023-05-27T06:29:01.000Z","updated_at":"2023-05-28T10:28:43.000Z","dependencies_parsed_at":"2023-07-30T06:16:32.540Z","dependency_job_id":"266d1178-5a27-4b73-8d88-15fb6a6a96e3","html_url":"https://github.com/iamazeem/go-grpc-test","commit_stats":null,"previous_names":["iamazeem/go-grpc-test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fgo-grpc-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fgo-grpc-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fgo-grpc-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamazeem%2Fgo-grpc-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamazeem","download_url":"https://codeload.github.com/iamazeem/go-grpc-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237890771,"owners_count":19382565,"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":["go","golang","grpc","grpc-client","grpc-go","grpc-server"],"created_at":"2024-12-16T08:28:40.833Z","updated_at":"2025-02-09T01:16:25.290Z","avatar_url":"https://github.com/iamazeem.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-grpc-test\n\n[![CI](https://github.com/iamazeem/go-grpc-test/actions/workflows/ci.yml/badge.svg)](https://github.com/iamazeem/go-grpc-test/actions/workflows/ci.yml)\n\nGo [GRPC](https://grpc.io/) Test\n\n- sample DNS client and server apps\n\nSee [dns/dns.proto](dns/dns.proto) for request and response.\n\n## Overview Diagram\n\n```mermaid\nsequenceDiagram\n    autonumber\n    participant client\n    participant server\n    client-\u003e\u003eserver: request (domain)\n    activate server\n    note right of server: check domain in cache\n    server-\u003e\u003eclient: response (status, ip)\n    deactivate server\n    note left of client: use ip if status = RESOLVED\n```\n\n## Set up\n\n- Install protocol buffers compiler (`protoc`)\n\n- Install protocol buffers and GRPC plugins:\n\n  ```shell\n  go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28\n  go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2\n  ```\n\n  Update `GOPATH`:\n\n  ```shell\n  export PATH=\"$PATH:$(go env GOPATH)/bin\"\n  ```\n\n- Generate protocol buffers and GRPC files:\n\n  ```shell\n  protoc \\\n    --go_out=. \\\n    --go_opt=paths=source_relative \\\n    --go-grpc_out=. \\\n    --go-grpc_opt=paths=source_relative \\\n    dns/dns.proto\n  ```\n\n  Following files are generated:\n\n  - `dns/dns.pb.go`\n  - `dns_grpc.pb.go`\n\n  The generated files are already under `dns` directory.\n\n## Build\n\n```shell\ngo mod download\ngo build -o dns-server server/main.go\ngo build -o dns-client client/main.go\n```\n\n## Run\n\nRun server in a separate terminal (as it blocks):\n\n```shell\n$ ./dns-server\nstaring DNS GRPC server on 0.0.0.0:9000\ngRPC server started listening on 0.0.0.0:9000\n```\n\nRun client from a different terminal:\n\n```shell\n$ ./dns-client --domain \"domain.xyz\"\n192.168.0.0\n```\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamazeem%2Fgo-grpc-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamazeem%2Fgo-grpc-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamazeem%2Fgo-grpc-test/lists"}