package serverimp

import (
	"net/http"
	"sync"

	"github.com/tech/sendico/pkg/api/routers"
	"github.com/tech/sendico/pkg/discovery"
	"github.com/tech/sendico/pkg/mlogger"
)

// Imp is the concrete implementation of the discovery server application.
type Imp struct {
	logger mlogger.Logger
	file   string
	debug  bool

	config      *config
	registrySvc *discovery.RegistryService
	announcer   *discovery.Announcer

	metricsSrv    *http.Server
	metricsHealth routers.Health

	stopOnce sync.Once
	doneOnce sync.Once
	stopCh   chan struct{}
	doneCh   chan struct{}
}
