mirror of
https://github.com/Xevion/HATray.git
synced 2025-12-06 07:15:10 -06:00
18 lines
524 B
Go
18 lines
524 B
Go
package service
|
|
|
|
import (
|
|
"ha-tray/internal/app"
|
|
"log/slog"
|
|
)
|
|
|
|
// This is an intentionally very-simple interface as the main program entrypoint needs to know very little about the service layer.
|
|
// The service layer is completely responsible for the lifecycle of the application, implemented per-platform.
|
|
type Service interface {
|
|
Run() error
|
|
}
|
|
|
|
// NewService creates a new service instance for the current platform
|
|
func NewService(logger *slog.Logger, appLayer *app.App) Service {
|
|
return newService(logger, appLayer)
|
|
}
|