{"id":15528418,"url":"https://github.com/samdvr/heartbeat","last_synced_at":"2025-10-18T08:13:20.085Z","repository":{"id":70614572,"uuid":"117049073","full_name":"samdvr/heartbeat","owner":"samdvr","description":"Service Discovery Server","archived":false,"fork":false,"pushed_at":"2018-01-11T15:40:17.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-03T08:01:41.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samdvr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-01-11T04:15:44.000Z","updated_at":"2018-01-11T04:19:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"6d8f9c28-bebb-42df-8e29-0a84c37278b4","html_url":"https://github.com/samdvr/heartbeat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2Fheartbeat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2Fheartbeat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2Fheartbeat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2Fheartbeat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samdvr","download_url":"https://codeload.github.com/samdvr/heartbeat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246106668,"owners_count":20724400,"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-10-02T11:13:03.891Z","updated_at":"2025-10-18T08:13:15.047Z","avatar_url":"https://github.com/samdvr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heartbeat\n\n## Disclaimer\n\nThis project is a basic prototype for more battle tested service discovery libraries, checkout\n[consul](https://github.com/hashicorp/consul) or [eureka](https://github.com/Netflix/eureka)\n\n## Creating a heartbeat\n\nNodes should hit this endpoint every 30 seconds to be considered healthy. If a node misses 2 heartbeats (60 seconds), it will get evicted from service's healthy node list.\n\n### POST /heartbeat\n\nParameters\nservice   | string | required | Service name of this node.\nip        | string | required | IP Address of this node.\ntimestamp | string | required | Epoch timestamp of the heartbeat.\n\nExample:\n\n#### Request\n\n```\ncurl -X POST \\\n  http://localhost:8080/heartbeat \\\n  -d 'ip=127.0.0.1\u0026service=user\u0026timestamp=1515683663'\n```\n\n#### Response\n```\n  Status: 201\n  {}\n ```\n\n\n## Getting a healthy node for a service\n\n### GET /service/:name\nReturns a healthy node's ip address for a given service.\n\n#### Request\n\n```\n  curl -X GET http://localhost:8080/service/sam\n```\n\n#### Response\n\n```\n  {\"ip\":\"127.0.0.1\"}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdvr%2Fheartbeat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamdvr%2Fheartbeat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdvr%2Fheartbeat/lists"}