{"id":16003461,"url":"https://github.com/nhatthm/go-grpc-middleware","last_synced_at":"2025-10-18T08:11:16.572Z","repository":{"id":38303571,"uuid":"418069952","full_name":"nhatthm/go-grpc-middleware","owner":"nhatthm","description":"gRPC Go Middleware: interceptors, helpers, utilities","archived":false,"fork":false,"pushed_at":"2025-08-28T07:43:20.000Z","size":226,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-28T14:38:57.695Z","etag":null,"topics":["go","golang","grpc","helper","interceptor","middleware","utilities"],"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/nhatthm.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,"zenodo":null}},"created_at":"2021-10-17T08:48:48.000Z","updated_at":"2025-08-28T07:43:22.000Z","dependencies_parsed_at":"2023-12-19T20:41:51.436Z","dependency_job_id":"660ca3c4-e1f8-4c76-9ccc-4235b7ea4fc7","html_url":"https://github.com/nhatthm/go-grpc-middleware","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/nhatthm/go-grpc-middleware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthm%2Fgo-grpc-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthm%2Fgo-grpc-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthm%2Fgo-grpc-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthm%2Fgo-grpc-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nhatthm","download_url":"https://codeload.github.com/nhatthm/go-grpc-middleware/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhatthm%2Fgo-grpc-middleware/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279491723,"owners_count":26179472,"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","status":"online","status_checked_at":"2025-10-18T02:00:06.492Z","response_time":62,"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":["go","golang","grpc","helper","interceptor","middleware","utilities"],"created_at":"2024-10-08T10:20:49.876Z","updated_at":"2025-10-18T08:11:16.543Z","avatar_url":"https://github.com/nhatthm.png","language":"Go","funding_links":["https://www.paypal.com/donate/?hosted_button_id=PJZSGJN57TDJY"],"categories":[],"sub_categories":[],"readme":"# Go gRPC Middleware\n\n[![GitHub Releases](https://img.shields.io/github/v/release/nhatthm/go-grpc-middleware)](https://github.com/nhatthm/go-grpc-middleware/releases/latest)\n[![Build Status](https://github.com/nhatthm/go-grpc-middleware/actions/workflows/test.yaml/badge.svg)](https://github.com/nhatthm/go-grpc-middleware/actions/workflows/test.yaml)\n[![codecov](https://codecov.io/gh/nhatthm/go-grpc-middleware/branch/master/graph/badge.svg?token=eTdAgDE2vR)](https://codecov.io/gh/nhatthm/go-grpc-middleware)\n[![Go Report Card](https://goreportcard.com/badge/github.com/nhatthm/go-grpc-middleware)](https://goreportcard.com/report/github.com/nhatthm/go-grpc-middleware)\n[![GoDevDoc](https://img.shields.io/badge/dev-doc-00ADD8?logo=go)](https://pkg.go.dev/github.com/nhatthm/go-grpc-middleware)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate/?hosted_button_id=PJZSGJN57TDJY)\n\n[gRPC Go](https://github.com/grpc/grpc-go) Middleware: interceptors, helpers, utilities.\n\n## Table of Contents\n\n- [Prerequisites](#prerequisites)\n- [Install](#install)\n- [Interceptors](#interceptors)\n    - [Ctxd Logger](#ctxd-logger)\n    - [Timeout](#timeout)\n\n## Prerequisites\n\n- `Go \u003e= 1.23`\n\n[\u003csub\u003e\u003csup\u003e[table of contents]\u003c/sup\u003e\u003c/sub\u003e](#table-of-contents)\n\n## Install\n\n```bash\ngo get github.com/nhatthm/go-grpc-middleware\n```\n\n[\u003csub\u003e\u003csup\u003e[table of contents]\u003c/sup\u003e\u003c/sub\u003e](#table-of-contents)\n\n## Interceptors\n\n### Ctxd Logger\n\nSee [bool64/ctxd](https://github.com/bool64/ctxd)\n\n- Server middlewares\n  - `ctxd.UnaryServerInterceptor`\n  - `ctxd.StreamServerInterceptor`\n- Client middlewares\n  - `ctxd.UnaryClientInterceptor`\n  - `ctxd.StreamClientInterceptor`\n\n[\u003csub\u003e\u003csup\u003e[table of contents]\u003c/sup\u003e\u003c/sub\u003e](#table-of-contents)\n\n### Timeout\n\nThere are 4 dial options for gRPC client:\n\n- Sleep for a duration before doing the job. \u003cbr/\u003e\n  `timeout.WithStreamClientSleepInterceptor` \u003cbr/\u003e\n  `timeout.WithUnaryClientSleepInterceptor`\n- Automatically creates a new context with given duration if there is none in the current context. \u003cbr/\u003e\n  `timeout.WithStreamClientTimeoutInterceptor` \u003cbr/\u003e\n  `timeout.WithUnaryClientTimeoutInterceptor` \n\n## Donation\n\nIf this project help you reduce time to develop, you can give me a cup of coffee :)\n\n[\u003csub\u003e\u003csup\u003e[table of contents]\u003c/sup\u003e\u003c/sub\u003e](#table-of-contents)\n\n### Paypal donation\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate/?hosted_button_id=PJZSGJN57TDJY)\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;or scan this\n\n\u003cimg src=\"https://user-images.githubusercontent.com/1154587/113494222-ad8cb200-94e6-11eb-9ef3-eb883ada222a.png\" width=\"147px\" /\u003e\n\n[\u003csub\u003e\u003csup\u003e[table of contents]\u003c/sup\u003e\u003c/sub\u003e](#table-of-contents)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhatthm%2Fgo-grpc-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnhatthm%2Fgo-grpc-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhatthm%2Fgo-grpc-middleware/lists"}