tercul-backend/syncjob/types.go
Damir Mukimov fa336cacf3
wip
2025-09-01 00:43:59 +02:00

35 lines
623 B
Go

package syncjob
import (
"time"
)
// Task types constants
const (
TaskFullSync = "sync:full"
TaskEntitySync = "sync:entity"
TaskEdgeSync = "sync:edge"
)
// Default configuration values
const (
DefaultBatchSize = 100
DefaultEntityDelay = 5 * time.Second
DefaultEdgeDelay = 5 * time.Second
DefaultFullSyncDelay = 10 * time.Second
)
// Payload types for different sync tasks
type SyncPayload struct {
Full bool `json:"full"`
}
type EntitySyncPayload struct {
ClassName string `json:"class_name"`
}
type EdgeSyncPayload struct {
BatchSize int `json:"batch_size"`
Offset int `json:"offset"`
}