Documentation
¶
Overview ¶
Package relation provides async relation and conflict detection for observations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector performs async relation and conflict detection after observation creation.
func NewDetector ¶
func NewDetector( vectorClient vector.Client, relationStore *gorm.RelationStore, conflictStore *gorm.ConflictStore, observationStore *gorm.ObservationStore, ) *Detector
NewDetector creates a new relation detector. All parameters are required; passing nil for any will cause panics at detection time.
func (*Detector) BackfillRelations ¶ added in v1.1.0
func (d *Detector) BackfillRelations(ctx context.Context, project string, batchSize int, onProgress func(processed, total int)) (int, int, error)
BackfillRelations processes existing observations to detect relations. Processes in batches, calling Detect() for each observation. Returns the number of observations processed and relations created.
Click to show internal directories.
Click to hide internal directories.