{"id":37139028,"url":"https://github.com/samgiles/health","last_synced_at":"2026-01-14T16:01:49.890Z","repository":{"id":143458998,"uuid":"152633604","full_name":"samgiles/health","owner":"samgiles","description":"Async healthchecks for Golang applications supporting liveness and readiness checks","archived":false,"fork":false,"pushed_at":"2018-10-11T18:13:29.000Z","size":5,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-15T01:39:37.086Z","etag":null,"topics":["golang","healthcheck","k8s","kubernetes","microservice","sre"],"latest_commit_sha":null,"homepage":null,"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/samgiles.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":"2018-10-11T17:58:25.000Z","updated_at":"2021-10-26T22:03:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"5fdc97ec-821a-4e37-bd6b-da7bd79abe56","html_url":"https://github.com/samgiles/health","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samgiles/health","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samgiles%2Fhealth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samgiles%2Fhealth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samgiles%2Fhealth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samgiles%2Fhealth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samgiles","download_url":"https://codeload.github.com/samgiles/health/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samgiles%2Fhealth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28425596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"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":["golang","healthcheck","k8s","kubernetes","microservice","sre"],"created_at":"2026-01-14T16:01:49.135Z","updated_at":"2026-01-14T16:01:49.882Z","avatar_url":"https://github.com/samgiles.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Async Healthcheck controller for Go\n\n[![Build Status](https://travis-ci.com/samgiles/health.svg?branch=master)](https://travis-ci.com/samgiles/health)\n\n- Supports Readiness and Liveness states (k8s).\n- Async healthchecks only\n- Go mod support\n\n## Example\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"time\"\n\n    \"github.com/samgiles/health\"\n)\n\ntype HealthCheckExample struct {\n    health.DefaultHealthCheck\n\n    ready bool\n    healthy bool\n}\n\nfunc (hc *HealthCheckExample) RunHealthCheck() health.HealthCheckResult {\n    if !hc.healthy {\n        return health.UnhealthyResult(\"Not Healthy!\")\n    }\n\n    if !hc.ready {\n        return health.NotReadyResult(\"Not Ready!\")\n    }\n\n    return health.HealthyResult()\n}\n\nfunc (hc *HealthCheckExample) HealthCheckName() string {\n\treturn \"my-test-healthcheck\"\n}\n\nfunc (hc *HealthCheckExample) HealthCheckFrequency() time.Duration {\n\treturn 5 * time.Second\n}\n\nfunc main() {\n   controller := health.NewHealthCheckController()\n   defer controller.Stop()\n\n   controller.AddHealthCheck(\u0026HealthCheckExample{})\n\n   // You might use the values from Readiness and Liveness in your own router\n   // and response\n   for {\n       time.Sleep(5 * time.Second)\n       fmt.Println(controller.Readiness())\n       fmt.Println(controller.Liveness())\n   }\n}\n```\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamgiles%2Fhealth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamgiles%2Fhealth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamgiles%2Fhealth/lists"}