2025-01-24 14:52:56 +00:00
|
|
|
package job
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"queryorchestration/internal/client"
|
|
|
|
|
"queryorchestration/internal/job/collector"
|
2025-01-31 13:43:55 +00:00
|
|
|
"queryorchestration/internal/serviceconfig"
|
2025-01-24 14:52:56 +00:00
|
|
|
|
|
|
|
|
"github.com/google/uuid"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Job struct {
|
|
|
|
|
ID uuid.UUID
|
|
|
|
|
ClientID uuid.UUID
|
|
|
|
|
CanSync bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Services struct {
|
|
|
|
|
Collector *collector.Service
|
|
|
|
|
Client *client.Service
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Service struct {
|
2025-01-31 13:43:55 +00:00
|
|
|
cfg serviceconfig.ConfigProvider
|
2025-01-24 14:52:56 +00:00
|
|
|
svc *Services
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-31 13:43:55 +00:00
|
|
|
func New(cfg serviceconfig.ConfigProvider, svc *Services) *Service {
|
2025-01-24 14:52:56 +00:00
|
|
|
return &Service{
|
2025-01-31 13:43:55 +00:00
|
|
|
cfg,
|
2025-01-24 14:52:56 +00:00
|
|
|
svc,
|
|
|
|
|
}
|
|
|
|
|
}
|