MCPcopy Index your code
hub / github.com/devaccuracy/ledgerforge / createTransactionProcessor

Method createTransactionProcessor

reconciliation.go:432–445  ·  view source on GitHub ↗

createTransactionProcessor creates a new transaction processor for the reconciliation. Parameters: - reconciliation: The reconciliation object representing the current process. - progress: The current progress of the reconciliation. - reconciler: The reconciler function to apply. Returns: - *transac

(reconciliation model.Reconciliation, progress model.ReconciliationProgress, reconciler func(ctx context.Context, txns []*model.Transaction) ([]model.Match, []string))

Source from the content-addressed store, hash-verified

430// Returns:
431// - *transactionProcessor: The created transaction processor.
432func (s *LedgerForge) createTransactionProcessor(reconciliation model.Reconciliation, progress model.ReconciliationProgress, reconciler func(ctx context.Context, txns []*model.Transaction) ([]model.Match, []string)) *transactionProcessor {
433 conf, err := config.Fetch()
434 if err != nil {
435 logrus.Errorf("Error fetching configuration: %v", err)
436 }
437 return &transactionProcessor{
438 reconciliation: reconciliation,
439 progress: progress,
440 reconciler: reconciler,
441 datasource: s.datasource,
442 progressSaveCount: conf.Reconciliation.ProgressInterval,
443 ledgerforge: s,
444 }
445}
446
447// process handles individual transaction processing, applying the reconciliation logic and recording results.
448// It also updates internal transaction metadata asynchronously when matches are found.

Callers 1

processReconciliationMethod · 0.95

Calls 1

FetchFunction · 0.92

Tested by

no test coverage detected