Skip to content

daniel-oliveiravas/heartbeat-service

Repository files navigation

Heartbeat service

From wikipedia: "In computer science, a heartbeat is a periodic signal generated by hardware or software to indicate normal operation or to synchronize other parts of a computer system."

This service intend to do provide an API to send heartbeat signals, and then notify other systems.

API

POST /heartbeat/:id

  • Stores the following data structure in Redis:
{
  "id": "<uuid>",
  "status": "online | offline",
  "timestamp": "<timestamp>"
}

GET /heartbeat/:id

  • Retrieves the data structure stored in Redis

Environment configurations

  • HEARTBEAT_KAFKA_ADDRESSES: is a list of kafka hosts (comma separated)
  • HEARTBEAT_REDIS_ADDRESS: is the host of the redis instance used as DB
  • HEARTBEAT_TOPIC_URL: is the URL of the topic to publish the notification to (current implementation expects the name of a kafka topic)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published