package main

import (
	"time"

	"deevirt.fr/compute/cmd/monitor/events"
	"deevirt.fr/compute/cmd/monitor/metrics"

	"github.com/coreos/go-systemd/v22/daemon"
)

func main() {
	go metrics.Server()
	go events.Server()

	daemon.SdNotify(false, daemon.SdNotifyReady)

	for {
		daemon.SdNotify(false, daemon.SdNotifyWatchdog)

		time.Sleep(5 * time.Second)
	}
}
