{"id":20148219,"url":"https://github.com/chainguard-dev/go-grpc-kit","last_synced_at":"2025-12-15T17:32:06.589Z","repository":{"id":43067601,"uuid":"455306330","full_name":"chainguard-dev/go-grpc-kit","owner":"chainguard-dev","description":"Utility methods for gRPC.","archived":false,"fork":false,"pushed_at":"2024-10-21T20:07:20.000Z","size":369,"stargazers_count":8,"open_issues_count":4,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-22T05:56:08.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/chainguard-dev.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":"2022-02-03T19:49:44.000Z","updated_at":"2024-10-21T16:51:58.000Z","dependencies_parsed_at":"2024-01-03T18:24:09.998Z","dependency_job_id":"56e84a34-04df-487a-8cb9-e4b9d56bf07a","html_url":"https://github.com/chainguard-dev/go-grpc-kit","commit_stats":{"total_commits":193,"total_committers":14,"mean_commits":"13.785714285714286","dds":0.2227979274611399,"last_synced_commit":"c6539fd27908c38aed7d6a267884cf06607dcd80"},"previous_names":["chainguard-dev/go-grpc"],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fgo-grpc-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fgo-grpc-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fgo-grpc-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fgo-grpc-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainguard-dev","download_url":"https://codeload.github.com/chainguard-dev/go-grpc-kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103907,"owners_count":21048244,"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":[],"created_at":"2024-11-13T22:35:36.241Z","updated_at":"2025-12-15T17:32:06.529Z","avatar_url":"https://github.com/chainguard-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gRPC Kit\n\nThis repository contains helpers working with gRPC.\n\n## gRPC Duplex\n\nFor cases where you would like to serve both the gRPC endpoint and a\n[gRPC Gateway](https://grpc-ecosystem.github.io/grpc-gateway/), the\nchainguard.dev/grpc/pkg/duplex package is a helpful wrapper.\n\nFirst, define the REST endpoints in the `.proto` file. Then change to use the\nduplex object to start and build up the gRPC server. Example:\n\n```go\nd := duplex.New(8080)\n\npb.Register\u003cType\u003eServer(d.Server, impl.New\u003cType\u003eServer())\nif err := d.RegisterHandler(ctx, impl.Register\u003cType\u003eServiceHandlerFromEndpoint); err != nil {\n    log.Panicf(\"Failed to register gateway endpoint: %v\", err)\n}\n\n...\n\nif err := d.ListenAndServe(ctx); err != nil {\n    log.Panicf(\"ListenAndServe() = %v\", err)\n}\n```\n\nRun this and you should see a message like:\n\n```text\nDuplex gRPC/HTTP server starting at ::8080\n```\n\n### Options\n\nYou can pass `grpc.ServerOption` and `runtime.NewServeMux` into `duplex.New`.\n\nFor example, if you wanted to make a duplex server with a\n[unary interceptor](https://pkg.go.dev/google.golang.org/grpc#UnaryInterceptor):\n\n```go\nd := duplex.New(port, grpc.UnaryInterceptor(myInterceptorFn))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fgo-grpc-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainguard-dev%2Fgo-grpc-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fgo-grpc-kit/lists"}