Files
query-orchestration/internal/document/service.go
T
2024-12-19 11:44:13 +00:00

31 lines
684 B
Go

package document
import (
"context"
"gotemplate/internal/database/repository"
)
type Service struct {
db *repository.Queries
}
type Document struct {
ID string `json:"id"`
JobID string `json:"jobId"`
Name string `json:"name"`
}
func New(ctx context.Context, db *repository.Queries) *Service {
return &Service{
db: db,
}
}
func (s *Service) Sync(ctx context.Context, doc Document) error {
// Check if collector exists for doc and is synced
// Check if job set up
// If not find all outputs and see if any are out of sync/missing
// create dependency tree - if sync triggered, sync all dependent outputs by using queue
return nil
}