{"id":28484619,"url":"https://github.com/naughtygopher/proberesponder","last_synced_at":"2026-04-29T09:32:03.442Z","repository":{"id":271735428,"uuid":"914415131","full_name":"naughtygopher/proberesponder","owner":"naughtygopher","description":"proberesponder is a tiny \u0026 super simple package to setup a responder for probe requests","archived":false,"fork":false,"pushed_at":"2026-02-04T10:47:37.000Z","size":38,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-04T17:32:16.011Z","etag":null,"topics":["go","go-library","golang","health-check","healthcheck","kubernetes","probe","probe-requests"],"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/naughtygopher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["bnkamalesh"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-01-09T14:54:33.000Z","updated_at":"2026-02-04T06:20:36.000Z","dependencies_parsed_at":"2025-01-09T15:44:41.615Z","dependency_job_id":"2e9c39e7-1463-46e7-81db-28c8234f41e3","html_url":"https://github.com/naughtygopher/proberesponder","commit_stats":null,"previous_names":["naughtygopher/proberesponder"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/naughtygopher/proberesponder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naughtygopher%2Fproberesponder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naughtygopher%2Fproberesponder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naughtygopher%2Fproberesponder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naughtygopher%2Fproberesponder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naughtygopher","download_url":"https://codeload.github.com/naughtygopher/proberesponder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naughtygopher%2Fproberesponder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32419854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["go","go-library","golang","health-check","healthcheck","kubernetes","probe","probe-requests"],"created_at":"2025-06-07T22:35:05.493Z","updated_at":"2026-04-29T09:32:03.426Z","avatar_url":"https://github.com/naughtygopher.png","language":"Go","funding_links":["https://github.com/sponsors/bnkamalesh"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/2bd99e22-d0fa-464f-8dca-3336ec7b6e0b\" alt=\"proberesponder gopher\" width=\"256px\"/\u003e\u003c/p\u003e\n\n[![](https://github.com/naughtygopher/proberesponder/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/naughtygopher/proberesponder/actions)\n[![Go Reference](https://pkg.go.dev/badge/github.com/naughtygopher/proberesponder.svg)](https://pkg.go.dev/github.com/naughtygopher/proberesponder)\n[![Go Report Card](https://goreportcard.com/badge/github.com/naughtygopher/proberesponder?cache_invalidate=v0.6.1)](https://goreportcard.com/report/github.com/naughtygopher/proberesponder)\n[![Coverage Status](https://coveralls.io/repos/github/naughtygopher/proberesponder/badge.svg?branch=main\u0026cache_invalidate=v0.6.1)](https://coveralls.io/github/naughtygopher/proberesponder?branch=main)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/creativecreature/sturdyc/blob/master/LICENSE)\n\n# Proberesponder\n\nProbe-responder is a package to deal with handling [appropriate statuses for Kuberentes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/). Even though the statuses are specific to Kubernetes, it can be used in any context, and can later be updated to include more if required.\n\nThe sample below shows how to use proberesponder, all the statuses are \"NOT OK\" by default. This is intentional as the app is expected to explicitly update the respective status as OK which would be more accurate than being OK by default.\n\n## Extras\n\nBy default a bare bones HTTP server can be setup to respond to probe request. The default HTTP handlers provided does content negotiation and provides appropriate response for JSON, HTML \u0026 plain text. For any unidentified content type, it will respond with JSON.\n\n`AppendHealthResponse` is a helper function with which you can maintain statuses of a dependency or similar. All the custom statuses set using this and the native ones (startup, live, ready) can be fetched as a map[string]string using `HealthResponse`.\n\n`DepProber` is an extension package which provides basic dependency probing. Refer to tests for usage of `Probe` to setup your probes.\ne.g. you can ping the application's database periodically, and then use it for updating the app status to not live.\n\n## Sample usage\n\n```golang\npackage main\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/naughtygopher/proberesponder\"\n\tpHTTP \"github.com/naughtygopher/proberesponder/extensions/http\"\n)\n\nfunc main() {\n\tpRes := proberesponder.New()\n\n    // use the below server `srv` if you need more control of how it's started, shutdown etc.\n\t// srv := pHTTP.Server(pRes, \"localhost\", 1234)\n\n\t// setup an HTTP server to handle probe requests\n\tgo pHTTP.StartHTTPServer(pRes, \"localhost\", 1234)\n\n\t// with set listener you can register a callback, for when any of the statuses\n\t// (startup, live, ready) is changed\n\tpRes.SetListener(func(status proberesponder.Statuskey, value bool) {\n\t\tfmt.Println(status, \"changed to\", value)\n\t})\n\n\t// Update the status of the app as Startup: OK\n\tpRes.SetNotStarted(false)\n\n\t// update the status of app as Live: OK\n\tpRes.SetNotLive(false)\n\t// update the status of app as Ready: OK\n\tpRes.SetNotReady(false)\n\n\t// set status of any service\n\tpRes.AppendHealthResponse(\"mydb\", \"OK\")\n\n\t// retrieves all the statuses maintained by the proberesponder, it returns a map[string]string\n\t_ = pRes.HealthResponse()\n\n\ttime.Sleep(time.Hour)\n}\n```\n\nBelow is an example of probe responses for HTTP requests using curl.\n\n```bash\n$ curl -H 'Accept: text/plain' localhost:1234/-/startup\nmydb: OK | probe-\u003elive: OK: 2025-01-09T17:45:24+01:00 | probe-\u003eready: OK: 2025-01-09T17:45:24+01:00 | probe-\u003estartup: OK: 2025-01-09T17:45:24+01:00 |\n\n$ curl -H 'Accept: text/plain' localhost:1234/-/ready\nprobe-\u003eready: OK: 2025-01-09T17:45:24+01:00 | probe-\u003estartup: OK: 2025-01-09T17:45:24+01:00 | mydb: OK | probe-\u003elive: OK: 2025-01-09T17:45:24+01:00 |\n\n$ curl -H 'Accept: text/plain' localhost:1234/-/live\nprobe-\u003estartup: OK: 2025-01-09T17:45:24+01:00 | mydb: OK | probe-\u003elive: OK: 2025-01-09T17:45:24+01:00 | probe-\u003eready: OK: 2025-01-09T17:45:24+01:00 |\n```\n\n## The gopher\n\nThe gopher used here was created using [Gopherize.me](https://gopherize.me/). Just like the handyman gopher here, proberesponder helps setup, well, a probe responder!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaughtygopher%2Fproberesponder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaughtygopher%2Fproberesponder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaughtygopher%2Fproberesponder/lists"}