{"id":36459382,"url":"https://github.com/tigerwill90/foxtimeout","last_synced_at":"2026-01-20T15:01:04.756Z","repository":{"id":189022938,"uuid":"679373224","full_name":"tigerwill90/foxtimeout","owner":"tigerwill90","description":"Timeout middleware for Fox","archived":false,"fork":false,"pushed_at":"2026-01-06T20:56:28.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-12T01:33:37.667Z","etag":null,"topics":["fox","go","golang","middleware","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/tigerwill90.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-16T17:34:45.000Z","updated_at":"2026-01-06T20:55:37.000Z","dependencies_parsed_at":"2024-12-01T15:28:41.130Z","dependency_job_id":"c0d6c898-257f-4dbd-b0a5-7ed6964fd3db","html_url":"https://github.com/tigerwill90/foxtimeout","commit_stats":null,"previous_names":["tigerwill90/foxtimeout"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/tigerwill90/foxtimeout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigerwill90%2Ffoxtimeout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigerwill90%2Ffoxtimeout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigerwill90%2Ffoxtimeout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigerwill90%2Ffoxtimeout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tigerwill90","download_url":"https://codeload.github.com/tigerwill90/foxtimeout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigerwill90%2Ffoxtimeout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28605916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T14:45:23.139Z","status":"ssl_error","status_checked_at":"2026-01-20T14:44:16.929Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fox","go","golang","middleware","timeout"],"created_at":"2026-01-11T23:52:03.096Z","updated_at":"2026-01-20T15:01:04.747Z","avatar_url":"https://github.com/tigerwill90.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Reference](https://pkg.go.dev/badge/github.com/tigerwill90/foxtimeout.svg)](https://pkg.go.dev/github.com/tigerwill90/foxtimeout)\n[![tests](https://github.com/tigerwill90/foxtimeout/actions/workflows/tests.yaml/badge.svg)](https://github.com/tigerwill90/foxtimeout/actions?query=workflow%3Atests)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tigerwill90/foxtimeout)](https://goreportcard.com/report/github.com/tigerwill90/foxtimeout)\n[![codecov](https://codecov.io/gh/tigerwill90/foxtimeout/branch/master/graph/badge.svg?token=D6qSTlzEcE)](https://codecov.io/gh/tigerwill90/foxtimeout)\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/tigerwill90/foxtimeout)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/tigerwill90/foxtimeout)\n\n# Foxtimeout\n\nFoxtimeout is a middleware for [Fox](https://github.com/tigerwill90/fox) which ensure that a handler do not exceed the\nconfigured timeout limit.\n\n## Disclaimer\nFoxtimeout's API is closely tied to the Fox router, and it will only reach v1 when the router is stabilized.\nDuring the pre-v1 phase, breaking changes may occur and will be documented in the release notes.\n\n## Getting started\n### Installation\n\n````shell\ngo get -u github.com/tigerwill90/foxtimeout\n````\n### Feature\n- Allows for custom timeout response to better suit specific use cases.\n- Tightly integrates with the Fox ecosystem for enhanced performance and scalability.\n- Supports dynamic timeout configuration on a per-route \u0026 per-request basis using custom `Resolver`.\n\n### Usage\n````go\npackage main\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/tigerwill90/fox\"\n\t\"github.com/tigerwill90/foxtimeout\"\n)\n\nfunc main() {\n\tf := fox.MustRouter(\n\t\tfox.DefaultOptions(),\n\t\tfox.WithMiddleware(\n\t\t\tfoxtimeout.Middleware(2*time.Second),\n\t\t),\n\t)\n\n\tf.MustAdd(fox.MethodGet, \"/hello/{name}\", func(c *fox.Context) {\n\t\t_ = c.String(http.StatusOK, fmt.Sprintf(\"Hello %s\\n\", c.Param(\"name\")))\n\t})\n\t// Disable timeout the middleware for this route\n\tf.MustAdd(fox.MethodGet, \"/download/{filepath}\", DownloadHandler, foxtimeout.HandlerTimeout(foxtimeout.NoTimeout))\n\t// Use 15s timeout instead of the global 2s for this route\n\tf.MustAdd(fox.MethodGet, \"/workflow/{id}/start\", WorkflowHandler, foxtimeout.HandlerTimeout(15*time.Second))\n\n\tif err := http.ListenAndServe(\":8080\", f); err != nil \u0026\u0026 !errors.Is(err, http.ErrServerClosed) {\n\t\tlog.Fatalln(err)\n\t}\n}\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigerwill90%2Ffoxtimeout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftigerwill90%2Ffoxtimeout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigerwill90%2Ffoxtimeout/lists"}