Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DuplicateChecker ¶
type DuplicateChecker struct {
// contains filtered or unexported fields
}
DuplicateChecker checks for duplicate records by comparing name@version against existing records in the directory. It queries only the modules that are relevant for the configured import type.
func NewDuplicateChecker ¶
func NewDuplicateChecker(ctx context.Context, client config.ClientInterface, importType config.ImportType, debug bool) (*DuplicateChecker, error)
NewDuplicateChecker creates a new duplicate checker for the given import type. It queries the directory for all existing records of the relevant module(s) and builds an in-memory cache.
func (*DuplicateChecker) FilterDuplicates ¶
func (c *DuplicateChecker) FilterDuplicates(ctx context.Context, inputCh <-chan types.SourceItem, result *types.Result) <-chan types.SourceItem
FilterDuplicates implements the DuplicateChecker interface. It filters out duplicate records from the input channel and returns a channel with only non-duplicate records. It tracks only the skipped (duplicate) count. The transform stage will track the total records that are actually processed.