package serverimp

import (
	"github.com/tech/sendico/payments/storage"
	"github.com/tech/sendico/pkg/db"
	"github.com/tech/sendico/pkg/discovery"
	"github.com/tech/sendico/pkg/mlogger"
	"github.com/tech/sendico/pkg/server/grpcapp"
)

type methodsService interface {
	grpcapp.Service
	Shutdown()
}

type Imp struct {
	logger mlogger.Logger
	file   string
	debug  bool

	config    *config
	app       *grpcapp.App[storage.Repository]
	service   methodsService
	dbFactory db.Factory

	discoveryWatcher   *discovery.RegistryWatcher
	discoveryReg       *discovery.Registry
	discoveryAnnouncer *discovery.Announcer
}
