MCPcopy Create free account

hub / github.com/devaccuracy/ledgerforge / functions

Functions1,908 in github.com/devaccuracy/ledgerforge

↓ 1 callersMethodprocessLineageDebit
processLineageDebit processes a debit transaction for fund lineage tracking. It allocates funds from shadow balances based on the configured allocatio
lineage.go:396
↓ 1 callersFunctionprocessPercentageDistributions
processPercentageDistributions handles the second pass: percentage distributions
model/transaction.go:195
↓ 1 callersFunctionprocessResults
processResults processes the results from the results channel, collecting transactions and errors. It locks access to shared data to ensure thread saf
transaction.go:572
↓ 1 callersMethodprocessSingleTransaction
processSingleTransaction handles the processing of a single (non-split) transaction. It prepares the transaction, persists it to the database, and cre
transaction.go:1950
↓ 1 callersMethodprocessSplitTransactions
processSplitTransactions handles the processing of multiple split transactions. It prepares each split transaction, persists them to the database, and
transaction.go:1980
↓ 1 callersFunctionprocessTransactionAsync
(ctx context.Context, l *LedgerForge, transaction *model.Transaction, originalRef string, originalTxnID string
transaction.go:1852
↓ 1 callersMethodprocessTransactions
processTransactions processes the transactions in batches, applying the reconciliation logic for each transaction. Parameters: - ctx: The context cont
reconciliation.go:536
↓ 1 callersFunctionprocessWorker
(ctx context.Context, uploadID, source string, rowChan <-chan []string, columnMap map[string]int, store StoreF
internal/files/files.go:319
↓ 1 callersMethodqueueHook
queueHook creates an Asynq task for a hook execution and enqueues it. Parameters: - ctx: The context for the operation. - hook: The hook configuratio
internal/hooks/manager.go:324
↓ 1 callersMethodqueueIndexBatch
queueIndexBatch enqueues a batch of items to be indexed in dependency order. This ensures that dependencies (e.g., balances) are indexed before the pr
queue.go:110
↓ 1 callersMethodqueueInflightCommit
queueInflightCommit enqueues a task to handle inflight commit for a transaction. Parameters: - transactionID string: The ID of the transaction. - com
queue.go:308
↓ 1 callersMethodqueueInflightExpiry
queueInflightExpiry enqueues a task to handle inflight expiry for a transaction. Parameters: - transactionID string: The ID of the transaction. - exp
queue.go:81
↓ 1 callersMethodqueueReceiveTransaction
queueReceiveTransaction queues a transaction to receive funds into the destination's shadow balance. Parameters: - ctx context.Context: The context f
lineage.go:722
↓ 1 callersMethodqueueReleaseTransaction
queueReleaseTransaction queues a transaction to release funds from the aggregate balance back to a shadow balance. Parameters: - ctx context.Context:
lineage.go:597
↓ 1 callersMethodqueueShadowCreditTransaction
queueShadowCreditTransaction queues a shadow transaction to track credited funds from a provider. Parameters: - ctx context.Context: The context for
lineage.go:353
↓ 1 callersMethodqueuedBatchReferenceSets
queuedBatchReferenceSets prepares the prefetched and existing reference sets used by batch validation when batch reference checking is enabled.
transaction.go:1044
↓ 1 callersMethodqueuedCoalescingBatchSize
(force bool)
transaction.go:1312
↓ 1 callersFunctionrate
(failures, total int)
tests/loadtest/tools/queue_benchmark.go:630
↓ 1 callersMethodrecordMatchInTransaction
recordMatchInTransaction inserts a match into the database within a transaction context. It is used to save matches during a reconciliation process, e
database/reconciliation.go:257
↓ 1 callersFunctionrecordTransactionsInTx
recordTransactionsInTx inserts multiple transaction records within an existing database transaction using PostgreSQL's COPY protocol to reduce SQL par
database/transaction.go:113
↓ 1 callersFunctionrecoverPanic
recoverPanic handles any panics during program execution and logs the error using Logrus.
cmd/main.go:45
↓ 1 callersMethodredirect
(self, location: str)
tests/loadtest/tools/dashboard.py:99
↓ 1 callersMethodrefundNonInflightBatchTransactions
refundNonInflightBatchTransactions refunds all non-inflight transactions in a batch
transaction.go:2433
↓ 1 callersFunctionrenderChecks
(checks)
tests/loadtest/tools/dashboard/app.js:799
↓ 1 callersFunctionrenderCompareChecks
(leftRun, rightRun)
tests/loadtest/tools/dashboard/app.js:820
↓ 1 callersFunctionrenderCompareDashboard
(leftRun, rightRun)
tests/loadtest/tools/dashboard/app.js:578
↓ 1 callersFunctionrenderCompareLatency
(leftRun, rightRun)
tests/loadtest/tools/dashboard/app.js:703
↓ 1 callersFunctionrenderCompareMetrics
(leftRun, rightRun)
tests/loadtest/tools/dashboard/app.js:864
↓ 1 callersFunctionrenderCompareReliability
(leftRun, rightRun)
tests/loadtest/tools/dashboard/app.js:736
↓ 1 callersFunctionrenderCompareSelectionState
(compareRuns)
tests/loadtest/tools/dashboard/app.js:553
↓ 1 callersFunctionrenderCompareSummaryGrid
(leftRun, rightRun)
tests/loadtest/tools/dashboard/app.js:624
↓ 1 callersFunctionrenderCompareThresholds
(leftRun, rightRun)
tests/loadtest/tools/dashboard/app.js:777
↓ 1 callersFunctionrenderCompareThroughput
(leftRun, rightRun)
tests/loadtest/tools/dashboard/app.js:649
↓ 1 callersFunctionrenderEmptyState
()
tests/loadtest/tools/dashboard/app.js:595
↓ 1 callersFunctionrenderLatencyChart
(series, overview)
tests/loadtest/tools/dashboard/app.js:662
↓ 1 callersFunctionrenderMetricsTable
(stats)
tests/loadtest/tools/dashboard/app.js:845
↓ 1 callersFunctionrenderReliabilityChart
(series, overview)
tests/loadtest/tools/dashboard/app.js:716
↓ 1 callersFunctionrenderSummaryGrid
(overview, series, durationMs)
tests/loadtest/tools/dashboard/app.js:612
↓ 1 callersFunctionrenderThresholds
(thresholds)
tests/loadtest/tools/dashboard/app.js:758
↓ 1 callersFunctionrenderThroughputChart
(series)
tests/loadtest/tools/dashboard/app.js:636
↓ 1 callersMethodresolveBalanceIDs
resolveBalanceIDs resolves source and destination to actual balance IDs. If the source or destination starts with "@", it indicates a balance indicato
transaction.go:224
↓ 1 callersFunctionresolveJSONColumn
resolveJSONColumn maps a JSON column name to a safe column using only string literals. This breaks the taint chain for static analyzers.
internal/filter/sql_json.go:143
↓ 1 callersFunctionresolveQueueNames
(inspector *asynq.Inspector, cfg benchmarkConfig)
tests/loadtest/tools/queue_benchmark.go:280
↓ 1 callersFunctionresolveRedisSettings
(cfg benchmarkConfig)
tests/loadtest/tools/queue_benchmark.go:206
↓ 1 callersMethodrollback
rollback releases locks that were successfully acquired before a failure. Parameters: - ctx: The context for managing the unlock request lifecycle. -
internal/lock/lock.go:291
↓ 1 callersMethodrun
run executes the poll loop that periodically scans for stuck queued transactions.
queue_recovery.go:103
↓ 1 callersMethodrun
run is the main processing loop.
lineage_worker.go:145
↓ 1 callersMethodrunQueuedBatchPostCommitWork
runQueuedBatchPostCommitWork dispatches the post-commit work for a coalesced batch after the balance-set lock has been released.
transaction.go:1093
↓ 1 callersFunctionsafeColumnForSort
safeColumnForSort returns a safe column for sorting, with fallback to default.
internal/filter/sql_builder.go:456
↓ 1 callersFunctionsanitizeJSONKey
sanitizeJSONKey validates and returns a safe JSON key. The key is validated against a regex pattern in Validate(), but we need to explicitly break the
internal/filter/sql_json.go:155
↓ 1 callersFunctionscanAccountRow
scanAccountRow scans a row from the database into an Account object. It can also scan related Balance, Identity, and Ledger data if specified in the `
database/account.go:185
↓ 1 callersFunctionscanRow
Scans a SQL row result and maps it into a Balance object, including optional identity and ledger data. Converts string representations of big.Int fiel
database/balance.go:110
↓ 1 callersFunctionsendHeartbeat
sendHeartbeat initializes and maintains a periodic heartbeat to PostHog
cmd/server.go:140
↓ 1 callersFunctionserverCommands
* serverCommands returns the Cobra command responsible for starting the LedgerForge server. It sets up the API routes, traces, and TypeSense client be
cmd/server.go:319
↓ 1 callersMethodsetDatabaseDefaults
()
config/config.go:428
↓ 1 callersMethodsetDefaultValues
()
config/config.go:295
↓ 1 callersMethodsetQueueDefaults
()
config/config.go:375
↓ 1 callersMethodsetReconciliationDefaults
()
config/config.go:360
↓ 1 callersMethodsetRedisDefaults
()
config/config.go:419
↓ 1 callersMethodsetTransactionDefaults
()
config/config.go:332
↓ 1 callersFunctionsetupLedgerForge
setupLedgerForge creates and initializes a new LedgerForge instance based on the provided configuration. It connects to the data source (such as a dat
cmd/main.go:85
↓ 1 callersFunctionsetupMockDataSource
setupMockDataSource creates a mock data source with preset responses for benchmarks
transaction_benchmark_test.go:92
↓ 1 callersMethodsetupRateLimiting
()
config/config.go:450
↓ 1 callersFunctionsetupWorkerServers
(b *ledgerforgeInstance, conf *config.Configuration)
cmd/workers.go:506
↓ 1 callersFunctionshouldReindex
(ctx context.Context, client *TypesenseClient, ds database.IDataSource)
internal/search/reindex.go:475
↓ 1 callersFunctionsingleValueTrend
(value float64)
tests/loadtest/tools/queue_benchmark.go:589
↓ 1 callersFunctionstartMonitoringServer
(conf *config.Configuration)
cmd/workers.go:538
↓ 1 callersFunctionstartServer
(router *gin.Engine, port string)
cmd/server.go:259
↓ 1 callersFunctiontakeSnapshot
(inspector *asynq.Inspector, cfg benchmarkConfig)
tests/loadtest/tools/queue_benchmark.go:244
↓ 1 callersFunctiontoggleCompareMode
()
tests/loadtest/tools/dashboard/app.js:165
↓ 1 callersMethodtransactionQueueName
(transaction *model.Transaction)
queue.go:237
↓ 1 callersMethodtrimWhitespace
()
config/config.go:443
↓ 1 callersMethodtryRecordRecoveredTransaction
tryRecordRecoveredTransaction routes stuck-transaction replay through the shared queued processing path, selecting hot-lane execution when the queued
queue_recovery.go:230
↓ 1 callersFunctiontypesenseHasData
(ctx context.Context, client *TypesenseClient)
internal/search/reindex.go:463
↓ 1 callersFunctionupdateBalanceChunk
(ctx context.Context, tx *sql.Tx, balances []*model.Balance)
database/balance.go:951
↓ 1 callersMethodupdateFundAllocationMetadata
updateFundAllocationMetadata updates the transaction metadata with fund allocation details. Parameters: - ctx context.Context: The context for the op
lineage.go:754
↓ 1 callersMethodupdateMatchedTransactionsMetadata
updateMatchedTransactionsMetadata updates the metadata for internal transactions that were matched. This function adds reconciliation information to t
reconciliation.go:501
↓ 1 callersMethodupdateReconciliationStatus
updateReconciliationStatus updates the status of a reconciliation process in the database. Parameters: - ctx: The context controlling the request. - r
reconciliation.go:378
↓ 1 callersFunctionupdateSplitTransactions
updateSplitTransactions updates the metadata of split transactions to maintain their relationships. It sets the parent transaction ID and creates link
transaction.go:2079
↓ 1 callersMethodupdateTransactionAmount
updateTransactionAmount updates the transaction with the specified amount or the full remaining amount. Parameters: - transaction *model.Transaction:
inflight_transaction.go:344
↓ 1 callersMethodupsertCreditLineageMapping
upsertCreditLineageMapping creates or updates the lineage mapping for a credit transaction. Parameters: - ctx context.Context: The context for the op
lineage.go:324
↓ 1 callersMethodusedCoalescing
usedCoalescing reports whether the execution result came from a queued batch path instead of the single-transaction executor.
transaction.go:655
↓ 1 callersMethodvalidateAndPrepareTransaction
validateAndPrepareTransaction validates the transaction and prepares it by retrieving the source and destination balances. It starts a tracing span, v
transaction.go:1200
↓ 1 callersFunctionvalidateBalanceTimeParams
validateBalanceTimeParams validates the input parameters for GetBalanceAtTime
database/balance.go:1415
↓ 1 callersMethodvalidateCriteria
validateCriteria checks the validity of a criterion, including its field, operator, and drift values. Parameters: - criteria: The criteria to validate
reconciliation.go:1234
↓ 1 callersFunctionvalidateDistributions
validateDistributions checks that total distributions don't exceed limits
model/transaction.go:225
↓ 1 callersMethodvalidateDrift
validateDrift checks the allowable drift for the given field and operator. Drift refers to acceptable deviations (e.g., percentage for amounts or seco
reconciliation.go:1279
↓ 1 callersMethodvalidateField
validateField checks if the provided field is valid for a matching rule. Parameters: - field: The field to validate. Returns an error if the field is
reconciliation.go:1266
↓ 1 callersFunctionvalidateHook
validateHook checks if a hook configuration is valid. It ensures the URL and type are set correctly, and sets default values for timeout and retry cou
internal/hooks/manager.go:363
↓ 1 callersMethodvalidateOperator
validateOperator checks if the provided operator is valid. Parameters: - operator: The operator to validate. Returns an error if the operator is inval
reconciliation.go:1254
↓ 1 callersFunctionvalidateQueuedBatchCurrencies
validateQueuedBatchCurrencies ensures that every transaction in a coalesced batch uses the same currency before any lock or balance work begins.
transaction.go:981
↓ 1 callersMethodvalidateRequestedAmount
validateRequestedAmount validates that the requested amount is within allowed limits. Parameters: - transaction *model.Transaction: The transaction b
inflight_transaction.go:317
↓ 1 callersMethodvalidateRequiredFields
()
config/config.go:283
↓ 1 callersMethodvalidateRuleBasics
validateRuleBasics checks that the rule has a valid name and at least one criterion. Parameters: - rule: The rule to validate. Returns an error if the
reconciliation.go:1218
↓ 1 callersMethodvalidateTransactionForRefund
validateTransactionForRefund checks if the given transaction is eligible for a refund.
transaction.go:2286
↓ 1 callersFunctionvaluesDiffer
(leftValue, rightValue, formatter = (value) => String(value))
tests/loadtest/tools/dashboard/app.js:1077
↓ 1 callersMethodvoidInflightBatchTransactions
voidInflightBatchTransactions voids all inflight transactions in a batch
transaction.go:2419
↓ 1 callersFunctionworkerCommands
workerCommands defines the "workers" command to start worker processes. The workers listen to various queues such as transaction processing, indexing,
cmd/workers.go:424
MethodBackupDB
BackupDB creates a backup of the database and stores it on disk. It initializes a BackupManager and performs the backup operation. If any error occurs
api/admin.go:36
MethodBackupDBS3
BackupDBS3 creates a backup of the database and stores it in S3. It initializes a BackupManager and performs the backup operation to S3. If any error
api/admin.go:60
← previousnext →901–1,000 of 1,908, ranked by callers