Documentation
¶
Index ¶
- type AcquireInstallationBudgetLeaseParams
- type AcquireInstallationBudgetLeaseRow
- type AcquireOrRenewStreamWatermarkLeaseParams
- type AdvanceBackfillCursorParams
- type AdvanceGapHealCursorParams
- type AdvanceInstallationBackfillCursorParams
- type AdvanceSweepCursorParams
- type AppendAcceptedCheckHistoryParams
- type ApplyDerivedWorkItemBatchParams
- type BackfillChild
- type BackfillCursor
- type BumpRefreshIntentGenerationsRow
- type ChangeEvent
- type CheckHistory
- type CheckRun
- type CollectBudgetMetricsRow
- type CollectCacheStalenessMetricsRow
- type CollectConsumerStreamMetricsRow
- type CollectDeliveryMetricsRow
- type CollectDriftMetricsRow
- type CollectOperationHeartbeatMetricsRow
- type CollectPrunableOutboxMetricsRow
- type CollectRiverQueueDepthMetricsRow
- type CollectStreamWatermarkMetricsRow
- type CollectSweepMetricsRow
- type CollectTombstoneMetricsRow
- type CompleteGapHealCursorParams
- type CompleteRefreshIntentGenerationParams
- type CompleteSweepCursorParams
- type ConsumerCursor
- type CountLoadgenRunDeliveriesRow
- type CountPendingBackfillChildrenParams
- type DBTX
- type DeleteCheckHistoryBatchParams
- type DeleteLoadgenConsumerCursorParams
- type DerivationDirty
- type DriftEntity
- type DriftEntityKey
- type DriftFinding
- type DriftSampleCursor
- type EnsureBackfillCursorParams
- type EnsureConsumerCursorParams
- type EnsureInstallationBudgetParams
- type EnsureSweepCursorParams
- type EscalateOpenDriftFindingParams
- type GapHealCursor
- type GetBackfillCursorForUpdateParams
- type GetBackfillCursorParams
- type GetCachedEntitySnapshotParams
- type GetCachedEntitySnapshotRow
- type GetCheckRunsFetchMetadataParams
- type GetCheckRunsFetchMetadataRow
- type GetConsumerCursorForUpdateParams
- type GetDriftSampleCursorParams
- type GetLoadgenCacheSeedStateRow
- type GetOpenDriftFindingByHashParams
- type GetPullRequestByIdentityParams
- type GetPullRequestByIdentityRow
- type GetPullRequestByKeyParams
- type GetPullRequestByKeyRow
- type GetPullRequestFetchMetadataParams
- type GetPullRequestFetchMetadataRow
- type GetRefreshIntentGenerationForUpdateParams
- type GetRefreshIntentStateParams
- type GetRefreshIntentStateRow
- type GetRepoRulesFetchMetadataRow
- type GetStackByIdentityParams
- type GetStackByIdentityRow
- type GetStackByKeyParams
- type GetStackByKeyRow
- type GetStackFetchMetadataParams
- type GetStackFetchMetadataRow
- type GetSweepCursorForUpdateParams
- type GetSweepCursorParams
- type GetSweepPageParams
- type InsertChangeEventParams
- type InsertDriftFindingParams
- type InsertSweepSeenKeysParams
- type InsertWebhookDeliveryParams
- type InstallationBackfillCursor
- type InstallationBudget
- type ListCachedPRMembershipsParams
- type ListCachedPRMembershipsRow
- type ListLiveOpenPullRequestNumbersParams
- type ListLiveStackNumbersParams
- type ListLoadgenCachedCheckRunsRow
- type ListLoadgenCachedPullRequestsRow
- type ListLoadgenCachedReviewThreadsRow
- type ListLoadgenCachedStacksRow
- type ListLoadgenDroppedDeliveriesRow
- type ListMissingSweepEntityKeysParams
- type ListPRScopesByHeadSHAParams
- type ListPRScopesByHeadSHARow
- type ListPRsAffectedByBranchParams
- type ListPRsAffectedByBranchRow
- type ListSeenBackfillRefreshKeysParams
- type ListStacksAffectedByBranchParams
- type ListStaleClosedPullRequestsParams
- type ListStaleClosedPullRequestsRow
- type ListStaleClosedStacksParams
- type ListStaleClosedStacksRow
- type ListStaleOpenPullRequestsParams
- type ListStaleOpenPullRequestsRow
- type ListStaleOpenStacksParams
- type ListStaleOpenStacksRow
- type ListStaleRepoRulesParams
- type ListStaleRepoRulesRow
- type ListSweepRepositoriesRow
- type LoadDerivationSnapshotRow
- type MarkCompletedBackfillChildrenParams
- type MarkDerivationDirtyParams
- type NullRiverJobState
- type OperationHeartbeat
- type PageChangeEventsParams
- type PageChangeEventsRow
- type PruneChangeEventsParams
- type PruneResolvedDriftFindingBatchParams
- type PruneWebhookDeliveryPayloadBatchParams
- type PublishStreamWatermarkParams
- type PullRequest
- type Queries
- func (q *Queries) AcquireEntityAdvisoryLock(ctx context.Context, entityKey string) error
- func (q *Queries) AcquireEntitySessionLock(ctx context.Context, entityKey string) error
- func (q *Queries) AcquireInstallationBudgetLease(ctx context.Context, arg AcquireInstallationBudgetLeaseParams) ([]AcquireInstallationBudgetLeaseRow, error)
- func (q *Queries) AcquireOrRenewStreamWatermarkLease(ctx context.Context, arg AcquireOrRenewStreamWatermarkLeaseParams) (string, error)
- func (q *Queries) AcquireOutboxWatermarkFence(ctx context.Context, lockKey int64) error
- func (q *Queries) AcquireOutboxWriterFence(ctx context.Context, lockKey int64) error
- func (q *Queries) AdvanceBackfillCursor(ctx context.Context, arg AdvanceBackfillCursorParams) (BackfillCursor, error)
- func (q *Queries) AdvanceGapHealCursor(ctx context.Context, arg AdvanceGapHealCursorParams) (GapHealCursor, error)
- func (q *Queries) AdvanceInstallationBackfillCursor(ctx context.Context, arg AdvanceInstallationBackfillCursorParams) (InstallationBackfillCursor, error)
- func (q *Queries) AdvanceSweepCursor(ctx context.Context, arg AdvanceSweepCursorParams) (SweepCursor, error)
- func (q *Queries) AppendAcceptedCheckHistory(ctx context.Context, arg AppendAcceptedCheckHistoryParams) error
- func (q *Queries) ApplyDerivedWorkItemBatch(ctx context.Context, arg ApplyDerivedWorkItemBatchParams) ([]int64, error)
- func (q *Queries) BumpRefreshIntentGenerations(ctx context.Context, intents []byte) ([]BumpRefreshIntentGenerationsRow, error)
- func (q *Queries) ClaimDerivationDirtyScopes(ctx context.Context, dirtyCap int32) ([]string, error)
- func (q *Queries) ClaimWebhookDeliveries(ctx context.Context, batchSize int32) ([]WebhookDelivery, error)
- func (q *Queries) ClearDerivationDirtyScopes(ctx context.Context, scopeKeys []string) error
- func (q *Queries) CollectBudgetMetrics(ctx context.Context, installationID int64) ([]CollectBudgetMetricsRow, error)
- func (q *Queries) CollectCacheStalenessMetrics(ctx context.Context, installationID int64) ([]CollectCacheStalenessMetricsRow, error)
- func (q *Queries) CollectConsumerStreamMetrics(ctx context.Context) ([]CollectConsumerStreamMetricsRow, error)
- func (q *Queries) CollectDeliveryMetrics(ctx context.Context) (CollectDeliveryMetricsRow, error)
- func (q *Queries) CollectDriftMetrics(ctx context.Context, installationID int64) ([]CollectDriftMetricsRow, error)
- func (q *Queries) CollectOperationHeartbeatMetrics(ctx context.Context, installationID int64) ([]CollectOperationHeartbeatMetricsRow, error)
- func (q *Queries) CollectPrunableOutboxMetrics(ctx context.Context, retentionAge string) ([]CollectPrunableOutboxMetricsRow, error)
- func (q *Queries) CollectRiverQueueDepthMetrics(ctx context.Context) ([]CollectRiverQueueDepthMetricsRow, error)
- func (q *Queries) CollectStreamWatermarkMetrics(ctx context.Context) (CollectStreamWatermarkMetricsRow, error)
- func (q *Queries) CollectSweepMetrics(ctx context.Context, installationID int64) ([]CollectSweepMetricsRow, error)
- func (q *Queries) CollectTombstoneMetrics(ctx context.Context) ([]CollectTombstoneMetricsRow, error)
- func (q *Queries) CompleteGapHealCursor(ctx context.Context, arg CompleteGapHealCursorParams) (GapHealCursor, error)
- func (q *Queries) CompleteRefreshIntentGeneration(ctx context.Context, arg CompleteRefreshIntentGenerationParams) error
- func (q *Queries) CompleteSweepCursor(ctx context.Context, arg CompleteSweepCursorParams) (SweepCursor, error)
- func (q *Queries) CountDerivationDirty(ctx context.Context) (int64, error)
- func (q *Queries) CountDriftFindings(ctx context.Context) (int64, error)
- func (q *Queries) CountLoadgenRunDeliveries(ctx context.Context, deliveryGuids []string) (CountLoadgenRunDeliveriesRow, error)
- func (q *Queries) CountPendingBackfillChildren(ctx context.Context, arg CountPendingBackfillChildrenParams) (int64, error)
- func (q *Queries) CountPendingInstallationRepos(ctx context.Context, installationID int64) (int64, error)
- func (q *Queries) CountWebhookDeliveriesByStatus(ctx context.Context, status string) (int64, error)
- func (q *Queries) DeleteCheckHistoryBatch(ctx context.Context, arg DeleteCheckHistoryBatchParams) (int64, error)
- func (q *Queries) DeleteLoadgenConsumerCursor(ctx context.Context, arg DeleteLoadgenConsumerCursorParams) error
- func (q *Queries) EnsureBackfillCursor(ctx context.Context, arg EnsureBackfillCursorParams) (BackfillCursor, error)
- func (q *Queries) EnsureConsumerCursor(ctx context.Context, arg EnsureConsumerCursorParams) error
- func (q *Queries) EnsureGapHealCursor(ctx context.Context, installationID int64) (GapHealCursor, error)
- func (q *Queries) EnsureInstallationBackfillCursor(ctx context.Context, installationID int64) (InstallationBackfillCursor, error)
- func (q *Queries) EnsureInstallationBudget(ctx context.Context, arg EnsureInstallationBudgetParams) error
- func (q *Queries) EnsureSweepCursor(ctx context.Context, arg EnsureSweepCursorParams) (SweepCursor, error)
- func (q *Queries) EscalateOpenDriftFinding(ctx context.Context, arg EscalateOpenDriftFindingParams) (DriftFinding, error)
- func (q *Queries) GetBackfillCursor(ctx context.Context, arg GetBackfillCursorParams) (BackfillCursor, error)
- func (q *Queries) GetBackfillCursorForUpdate(ctx context.Context, arg GetBackfillCursorForUpdateParams) (BackfillCursor, error)
- func (q *Queries) GetCachedEntitySnapshot(ctx context.Context, arg GetCachedEntitySnapshotParams) (GetCachedEntitySnapshotRow, error)
- func (q *Queries) GetCheckRunsFetchMetadata(ctx context.Context, arg GetCheckRunsFetchMetadataParams) (GetCheckRunsFetchMetadataRow, error)
- func (q *Queries) GetConsumerCursorForUpdate(ctx context.Context, arg GetConsumerCursorForUpdateParams) (int64, error)
- func (q *Queries) GetDatabaseClock(ctx context.Context) (pgtype.Timestamptz, error)
- func (q *Queries) GetDriftFinding(ctx context.Context, id int64) (DriftFinding, error)
- func (q *Queries) GetDriftSampleCursor(ctx context.Context, arg GetDriftSampleCursorParams) (int64, error)
- func (q *Queries) GetGapHealCursorForUpdate(ctx context.Context, installationID int64) (GapHealCursor, error)
- func (q *Queries) GetInstallationBackfillCursor(ctx context.Context, installationID int64) (InstallationBackfillCursor, error)
- func (q *Queries) GetInstallationBackfillCursorForUpdate(ctx context.Context, installationID int64) (InstallationBackfillCursor, error)
- func (q *Queries) GetLoadgenCacheSeedState(ctx context.Context, installationID int64) (GetLoadgenCacheSeedStateRow, error)
- func (q *Queries) GetOpenDriftFindingByHash(ctx context.Context, arg GetOpenDriftFindingByHashParams) (DriftFinding, error)
- func (q *Queries) GetPullRequestByIdentity(ctx context.Context, arg GetPullRequestByIdentityParams) (GetPullRequestByIdentityRow, error)
- func (q *Queries) GetPullRequestByKey(ctx context.Context, arg GetPullRequestByKeyParams) (GetPullRequestByKeyRow, error)
- func (q *Queries) GetPullRequestFetchMetadata(ctx context.Context, arg GetPullRequestFetchMetadataParams) (GetPullRequestFetchMetadataRow, error)
- func (q *Queries) GetRefreshIntentGenerationForUpdate(ctx context.Context, arg GetRefreshIntentGenerationForUpdateParams) (int64, error)
- func (q *Queries) GetRefreshIntentState(ctx context.Context, arg GetRefreshIntentStateParams) (GetRefreshIntentStateRow, error)
- func (q *Queries) GetRepoByFullName(ctx context.Context, fullName string) (Repo, error)
- func (q *Queries) GetRepoByGitHubID(ctx context.Context, ghID int64) (Repo, error)
- func (q *Queries) GetRepoRulesFetchMetadata(ctx context.Context, repoFullName string) (GetRepoRulesFetchMetadataRow, error)
- func (q *Queries) GetStackByIdentity(ctx context.Context, arg GetStackByIdentityParams) (GetStackByIdentityRow, error)
- func (q *Queries) GetStackByKey(ctx context.Context, arg GetStackByKeyParams) (GetStackByKeyRow, error)
- func (q *Queries) GetStackFetchMetadata(ctx context.Context, arg GetStackFetchMetadataParams) (GetStackFetchMetadataRow, error)
- func (q *Queries) GetStreamPrunedThroughSequence(ctx context.Context, stream string) (int64, error)
- func (q *Queries) GetStreamSafeSequence(ctx context.Context) (int64, error)
- func (q *Queries) GetSweepCursor(ctx context.Context, arg GetSweepCursorParams) (SweepCursor, error)
- func (q *Queries) GetSweepCursorForUpdate(ctx context.Context, arg GetSweepCursorForUpdateParams) (SweepCursor, error)
- func (q *Queries) GetSweepPage(ctx context.Context, arg GetSweepPageParams) (SweepPage, error)
- func (q *Queries) GetWebhookDelivery(ctx context.Context, deliveryGuid string) (WebhookDelivery, error)
- func (q *Queries) HasOutstandingRefresh(ctx context.Context, refreshKey string) (bool, error)
- func (q *Queries) InsertChangeEvent(ctx context.Context, arg InsertChangeEventParams) (int64, error)
- func (q *Queries) InsertDriftFinding(ctx context.Context, arg InsertDriftFindingParams) (DriftFinding, error)
- func (q *Queries) InsertSweepSeenKeys(ctx context.Context, arg InsertSweepSeenKeysParams) (int64, error)
- func (q *Queries) InsertWebhookDelivery(ctx context.Context, arg InsertWebhookDeliveryParams) (int64, error)
- func (q *Queries) IsInstallationBackfillDone(ctx context.Context, installationID int64) (bool, error)
- func (q *Queries) ListCachedPRMemberships(ctx context.Context, arg ListCachedPRMembershipsParams) ([]ListCachedPRMembershipsRow, error)
- func (q *Queries) ListExistingWebhookDeliveryGUIDs(ctx context.Context, deliveryGuids []string) ([]string, error)
- func (q *Queries) ListLiveOpenPullRequestNumbers(ctx context.Context, arg ListLiveOpenPullRequestNumbersParams) ([]int32, error)
- func (q *Queries) ListLiveRepositoryNames(ctx context.Context, installationID int64) ([]string, error)
- func (q *Queries) ListLiveStackNumbers(ctx context.Context, arg ListLiveStackNumbersParams) ([]int32, error)
- func (q *Queries) ListLoadgenCachedCheckRuns(ctx context.Context, repoFullName string) ([]ListLoadgenCachedCheckRunsRow, error)
- func (q *Queries) ListLoadgenCachedPullRequests(ctx context.Context, repoFullName string) ([]ListLoadgenCachedPullRequestsRow, error)
- func (q *Queries) ListLoadgenCachedReviewThreads(ctx context.Context, repoFullName string) ([]ListLoadgenCachedReviewThreadsRow, error)
- func (q *Queries) ListLoadgenCachedStacks(ctx context.Context, repoFullName string) ([]ListLoadgenCachedStacksRow, error)
- func (q *Queries) ListLoadgenDroppedDeliveries(ctx context.Context, deliveryGuids []string) ([]ListLoadgenDroppedDeliveriesRow, error)
- func (q *Queries) ListMissingSweepEntityKeys(ctx context.Context, arg ListMissingSweepEntityKeysParams) ([]string, error)
- func (q *Queries) ListPRScopesByHeadSHA(ctx context.Context, arg ListPRScopesByHeadSHAParams) ([]ListPRScopesByHeadSHARow, error)
- func (q *Queries) ListPRsAffectedByBranch(ctx context.Context, arg ListPRsAffectedByBranchParams) ([]ListPRsAffectedByBranchRow, error)
- func (q *Queries) ListParkedWebhookDeliveries(ctx context.Context, resultLimit int32) ([]WebhookDelivery, error)
- func (q *Queries) ListRepositoryDerivationScopes(ctx context.Context, repoID int64) ([]string, error)
- func (q *Queries) ListSeenBackfillRefreshKeys(ctx context.Context, arg ListSeenBackfillRefreshKeysParams) ([]string, error)
- func (q *Queries) ListStacksAffectedByBranch(ctx context.Context, arg ListStacksAffectedByBranchParams) ([]int32, error)
- func (q *Queries) ListStaleClosedPullRequests(ctx context.Context, arg ListStaleClosedPullRequestsParams) ([]ListStaleClosedPullRequestsRow, error)
- func (q *Queries) ListStaleClosedStacks(ctx context.Context, arg ListStaleClosedStacksParams) ([]ListStaleClosedStacksRow, error)
- func (q *Queries) ListStaleOpenPullRequests(ctx context.Context, arg ListStaleOpenPullRequestsParams) ([]ListStaleOpenPullRequestsRow, error)
- func (q *Queries) ListStaleOpenStacks(ctx context.Context, arg ListStaleOpenStacksParams) ([]ListStaleOpenStacksRow, error)
- func (q *Queries) ListStaleRepoRules(ctx context.Context, arg ListStaleRepoRulesParams) ([]ListStaleRepoRulesRow, error)
- func (q *Queries) ListSweepRepositories(ctx context.Context, installationID int64) ([]ListSweepRepositoriesRow, error)
- func (q *Queries) LoadDerivationSnapshot(ctx context.Context, scopes []byte) ([]LoadDerivationSnapshotRow, error)
- func (q *Queries) MarkCompletedBackfillChildren(ctx context.Context, arg MarkCompletedBackfillChildrenParams) (int64, error)
- func (q *Queries) MarkDerivationDirty(ctx context.Context, arg MarkDerivationDirtyParams) error
- func (q *Queries) PageChangeEvents(ctx context.Context, arg PageChangeEventsParams) ([]PageChangeEventsRow, error)
- func (q *Queries) PruneChangeEvents(ctx context.Context, arg PruneChangeEventsParams) (int64, error)
- func (q *Queries) PruneResolvedDriftFindingBatch(ctx context.Context, arg PruneResolvedDriftFindingBatchParams) (int64, error)
- func (q *Queries) PruneWebhookDeliveryPayloadBatch(ctx context.Context, arg PruneWebhookDeliveryPayloadBatchParams) (int64, error)
- func (q *Queries) PublishStreamWatermark(ctx context.Context, arg PublishStreamWatermarkParams) (int64, error)
- func (q *Queries) ReadStreamWatermarkTarget(ctx context.Context, leaseToken string) (ReadStreamWatermarkTargetRow, error)
- func (q *Queries) ReapOrphanedRepositorySweepCursors(ctx context.Context, installationID int64) (int64, error)
- func (q *Queries) RecordConsumerResync(ctx context.Context, arg RecordConsumerResyncParams) error
- func (q *Queries) RecordOperationHeartbeat(ctx context.Context, arg RecordOperationHeartbeatParams) error
- func (q *Queries) ReleaseEntitySessionLock(ctx context.Context, entityKey string) error
- func (q *Queries) ReleaseInstallationBudgetLease(ctx context.Context, arg ReleaseInstallationBudgetLeaseParams) (int64, error)
- func (q *Queries) ReleaseStreamWatermarkLease(ctx context.Context, leaseToken string) error
- func (q *Queries) RenewInstallationBudgetLease(ctx context.Context, arg RenewInstallationBudgetLeaseParams) ([]pgtype.Timestamptz, error)
- func (q *Queries) ReplaceCheckRuns(ctx context.Context, arg ReplaceCheckRunsParams) ([]int64, error)
- func (q *Queries) ReplaceRepoRules(ctx context.Context, arg ReplaceRepoRulesParams) ([]string, error)
- func (q *Queries) ReplaceReviewThreads(ctx context.Context, arg ReplaceReviewThreadsParams) ([]string, error)
- func (q *Queries) RequeueParkedWebhookDeliveries(ctx context.Context, arg RequeueParkedWebhookDeliveriesParams) (int64, error)
- func (q *Queries) ResolveOpenDriftFindings(ctx context.Context, arg ResolveOpenDriftFindingsParams) (int64, error)
- func (q *Queries) RestartSweepCursorPass(ctx context.Context, arg RestartSweepCursorPassParams) (SweepCursor, error)
- func (q *Queries) SampleCachedEntitiesAfter(ctx context.Context, arg SampleCachedEntitiesAfterParams) ([]SampleCachedEntitiesAfterRow, error)
- func (q *Queries) SampleCachedEntitiesThrough(ctx context.Context, arg SampleCachedEntitiesThroughParams) ([]SampleCachedEntitiesThroughRow, error)
- func (q *Queries) SaveInstallationBudgetBackoff(ctx context.Context, arg SaveInstallationBudgetBackoffParams) (int64, error)
- func (q *Queries) SaveInstallationBudgetSnapshot(ctx context.Context, arg SaveInstallationBudgetSnapshotParams) (int64, error)
- func (q *Queries) SetBudgetLeaseTransactionTimeouts(ctx context.Context, timeout string) error
- func (q *Queries) SetDriftFindingHealGeneration(ctx context.Context, arg SetDriftFindingHealGenerationParams) (DriftFinding, error)
- func (q *Queries) SetLocalLockTimeout(ctx context.Context, lockTimeout string) error
- func (q *Queries) SetWebhookDeliveryResults(ctx context.Context, results []byte) (int64, error)
- func (q *Queries) ShowSynchronousCommit(ctx context.Context) (string, error)
- func (q *Queries) StartGapHealCursor(ctx context.Context, arg StartGapHealCursorParams) (GapHealCursor, error)
- func (q *Queries) StartSweepCursor(ctx context.Context, arg StartSweepCursorParams) (SweepCursor, error)
- func (q *Queries) TombstonePullRequest(ctx context.Context, arg TombstonePullRequestParams) (PullRequest, error)
- func (q *Queries) TombstoneRepository(ctx context.Context, arg TombstoneRepositoryParams) (Repo, error)
- func (q *Queries) TombstoneStack(ctx context.Context, arg TombstoneStackParams) (Stack, error)
- func (q *Queries) TouchCheckRunsCheckedAt(ctx context.Context, arg TouchCheckRunsCheckedAtParams) error
- func (q *Queries) TouchOpenDriftFinding(ctx context.Context, arg TouchOpenDriftFindingParams) (DriftFinding, error)
- func (q *Queries) TouchPullRequestCheckedAt(ctx context.Context, arg TouchPullRequestCheckedAtParams) error
- func (q *Queries) TouchRepoRulesCheckedAt(ctx context.Context, arg TouchRepoRulesCheckedAtParams) error
- func (q *Queries) TouchRepositoryCheckedAt(ctx context.Context, arg TouchRepositoryCheckedAtParams) error
- func (q *Queries) TouchReviewThreadsCheckedAt(ctx context.Context, arg TouchReviewThreadsCheckedAtParams) error
- func (q *Queries) TouchStackCheckedAt(ctx context.Context, arg TouchStackCheckedAtParams) error
- func (q *Queries) UpdateConsumerCursor(ctx context.Context, arg UpdateConsumerCursorParams) error
- func (q *Queries) UpsertBackfillChildren(ctx context.Context, arg UpsertBackfillChildrenParams) error
- func (q *Queries) UpsertDriftSampleCursor(ctx context.Context, arg UpsertDriftSampleCursorParams) error
- func (q *Queries) UpsertPullRequestWriteIfNewer(ctx context.Context, arg UpsertPullRequestWriteIfNewerParams) (PullRequest, error)
- func (q *Queries) UpsertRepoRuleSyncState(ctx context.Context, arg UpsertRepoRuleSyncStateParams) error
- func (q *Queries) UpsertRepositoryAlias(ctx context.Context, arg UpsertRepositoryAliasParams) error
- func (q *Queries) UpsertRepositoryWriteIfNewer(ctx context.Context, arg UpsertRepositoryWriteIfNewerParams) (Repo, error)
- func (q *Queries) UpsertStackWriteIfNewer(ctx context.Context, arg UpsertStackWriteIfNewerParams) (Stack, error)
- func (q *Queries) UpsertSweepPage(ctx context.Context, arg UpsertSweepPageParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type ReadStreamWatermarkTargetRow
- type RecordConsumerResyncParams
- type RecordOperationHeartbeatParams
- type RefreshIntentGeneration
- type ReleaseInstallationBudgetLeaseParams
- type RenewInstallationBudgetLeaseParams
- type ReplaceCheckRunsParams
- type ReplaceRepoRulesParams
- type ReplaceReviewThreadsParams
- type Repo
- type RepoAlias
- type RepoRule
- type RepoRuleSyncState
- type RequeueParkedWebhookDeliveriesParams
- type ResolveOpenDriftFindingsParams
- type RestartSweepCursorPassParams
- type ReviewThread
- type RiverJob
- type RiverJobState
- type SampleCachedEntitiesAfterParams
- type SampleCachedEntitiesAfterRow
- type SampleCachedEntitiesThroughParams
- type SampleCachedEntitiesThroughRow
- type SaveInstallationBudgetBackoffParams
- type SaveInstallationBudgetSnapshotParams
- type SetDriftFindingHealGenerationParams
- type Stack
- type StartGapHealCursorParams
- type StartSweepCursorParams
- type StreamHorizon
- type StreamWatermark
- type SweepCursor
- type SweepPage
- type SweepSeenKey
- type TombstonePullRequestParams
- type TombstoneRepositoryParams
- type TombstoneStackParams
- type TouchCheckRunsCheckedAtParams
- type TouchOpenDriftFindingParams
- type TouchPullRequestCheckedAtParams
- type TouchRepoRulesCheckedAtParams
- type TouchRepositoryCheckedAtParams
- type TouchReviewThreadsCheckedAtParams
- type TouchStackCheckedAtParams
- type UpdateConsumerCursorParams
- type UpsertBackfillChildrenParams
- type UpsertDriftSampleCursorParams
- type UpsertPullRequestWriteIfNewerParams
- type UpsertRepoRuleSyncStateParams
- type UpsertRepositoryAliasParams
- type UpsertRepositoryWriteIfNewerParams
- type UpsertStackWriteIfNewerParams
- type UpsertSweepPageParams
- type WebhookDelivery
- type WorkItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcquireInstallationBudgetLeaseRow ¶
type AcquireInstallationBudgetLeaseRow struct {
Class string
Remaining pgtype.Int8
RateLimit pgtype.Int8
ResetAt pgtype.Timestamptz
BackoffUntil pgtype.Timestamptz
LeaseUntil pgtype.Timestamptz
}
type AdvanceGapHealCursorParams ¶
type AdvanceGapHealCursorParams struct {
NextCursor string
UpdatedAt pgtype.Timestamptz
InstallationID int64
ExpectedCursor string
}
type BackfillChild ¶
type BackfillChild struct {
InstallationID int64
RepoFullName string
Kind string
RefreshKey string
TargetGeneration int64
CreatedAt pgtype.Timestamptz
CompletedAt pgtype.Timestamptz
}
type BackfillCursor ¶
type BackfillCursor struct {
InstallationID int64
RepoFullName string
Phase string
Page int32
CompletedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
QueueName string
}
type BumpRefreshIntentGenerationsRow ¶
type BumpRefreshIntentGenerationsRow struct {
Kind string
RefreshKey string
Generation int64
DeadlineAt pgtype.Timestamptz
EventReceivedAt pgtype.Timestamptz
}
type ChangeEvent ¶
type CheckHistory ¶
type CheckRun ¶
type CheckRun struct {
GhID int64
RepoID int64
NodeID string
Name string
Status string
Conclusion string
DetailsUrl string
AppSlug string
StartedAt pgtype.Timestamptz
CompletedAt pgtype.Timestamptz
GhUpdatedAt pgtype.Timestamptz
HeadSha string
SyncedAt pgtype.Timestamptz
Etag string
SyncSource string
TombstonedAt pgtype.Timestamptz
SemanticVersion string
LastCheckedAt pgtype.Timestamptz
}
type CollectBudgetMetricsRow ¶
type CollectDriftMetricsRow ¶
type CollectSweepMetricsRow ¶
type CompleteGapHealCursorParams ¶
type CompleteGapHealCursorParams struct {
CompletedAt pgtype.Timestamptz
InstallationID int64
ExpectedCursor string
}
type ConsumerCursor ¶
type ConsumerCursor struct {
Consumer string
Stream string
Seq int64
UpdatedAt pgtype.Timestamptz
ResyncCount int64
LastResyncAt pgtype.Timestamptz
}
type DeleteCheckHistoryBatchParams ¶
type DeleteCheckHistoryBatchParams struct {
Cutoff pgtype.Timestamptz
BatchSize int32
}
type DerivationDirty ¶
type DerivationDirty struct {
ScopeKey string
MarkedAt pgtype.Timestamptz
}
type DriftEntity ¶
type DriftEntityKey ¶
type DriftFinding ¶
type DriftFinding struct {
ID int64
InstallationID int64
EntityKind string
EntityKey string
DetectedAt pgtype.Timestamptz
CacheSnapshot []byte
UpstreamSnapshot []byte
Diff []byte
RefreshEnqueuedAt pgtype.Timestamptz
DiffHash string
FirstSeenAt pgtype.Timestamptz
LastSeenAt pgtype.Timestamptz
OccurrenceCount int64
HealGeneration int64
EscalatedAt pgtype.Timestamptz
ResolvedAt pgtype.Timestamptz
}
type DriftSampleCursor ¶
type DriftSampleCursor struct {
InstallationID int64
EntityKind string
SourceID int64
UpdatedAt pgtype.Timestamptz
}
type EnsureSweepCursorParams ¶
type EscalateOpenDriftFindingParams ¶
type EscalateOpenDriftFindingParams struct {
LastSeenAt pgtype.Timestamptz
CacheSnapshot []byte
UpstreamSnapshot []byte
Diff []byte
EscalatedAt pgtype.Timestamptz
ID int64
}
type GapHealCursor ¶
type GapHealCursor struct {
InstallationID int64
Cursor string
Cutoff pgtype.Timestamptz
StartedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
CompletedAt pgtype.Timestamptz
}
type GetBackfillCursorParams ¶
type GetPullRequestByIdentityRow ¶
type GetPullRequestByIdentityRow struct {
ID int64
RepoID int64
GhID pgtype.Int8
NodeID string
Number int32
Title string
State string
Draft bool
AuthorLogin string
HeadRef string
HeadSha string
BaseRef string
BaseSha string
ReviewDecision string
MergeableState string
StackNumber pgtype.Int4
StackPosition pgtype.Int4
GhUpdatedAt pgtype.Timestamptz
SyncedAt pgtype.Timestamptz
Etag string
SyncSource string
TombstonedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
DisplayUntil pgtype.Timestamptz
RepoFullName string
}
type GetPullRequestByKeyRow ¶
type GetPullRequestByKeyRow struct {
ID int64
RepoID int64
GhID pgtype.Int8
NodeID string
Number int32
Title string
State string
Draft bool
AuthorLogin string
HeadRef string
HeadSha string
BaseRef string
BaseSha string
ReviewDecision string
MergeableState string
StackNumber pgtype.Int4
StackPosition pgtype.Int4
GhUpdatedAt pgtype.Timestamptz
SyncedAt pgtype.Timestamptz
Etag string
SyncSource string
TombstonedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
DisplayUntil pgtype.Timestamptz
RepoFullName string
}
type GetRefreshIntentStateRow ¶
type GetRefreshIntentStateRow struct {
Generation int64
CompletedGeneration int64
DeadlineAt pgtype.Timestamptz
EventReceivedAt pgtype.Timestamptz
}
type GetStackByIdentityRow ¶
type GetStackByIdentityRow struct {
ID int64
RepoID int64
GhID pgtype.Int8
NodeID string
Number int32
BaseRef string
BaseSha string
Open bool
Entries []byte
GhUpdatedAt pgtype.Timestamptz
HeadSha string
SyncedAt pgtype.Timestamptz
Etag string
SyncSource string
TombstonedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
DisplayUntil pgtype.Timestamptz
RepoFullName string
}
type GetStackByKeyParams ¶
type GetStackByKeyRow ¶
type GetStackByKeyRow struct {
ID int64
RepoID int64
GhID pgtype.Int8
NodeID string
Number int32
BaseRef string
BaseSha string
Open bool
Entries []byte
GhUpdatedAt pgtype.Timestamptz
HeadSha string
SyncedAt pgtype.Timestamptz
Etag string
SyncSource string
TombstonedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
DisplayUntil pgtype.Timestamptz
RepoFullName string
}
type GetSweepCursorParams ¶
type GetSweepPageParams ¶
type InsertChangeEventParams ¶
type InstallationBackfillCursor ¶
type InstallationBackfillCursor struct {
InstallationID int64
Phase string
Page int32
QueueName string
CompletedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type InstallationBudget ¶
type InstallationBudget struct {
InstallationID int64
Class string
Remaining pgtype.Int8
RateLimit pgtype.Int8
ResetAt pgtype.Timestamptz
LeaseOwner pgtype.Text
LeaseUntil pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
BackoffUntil pgtype.Timestamptz
}
type ListLoadgenCachedCheckRunsRow ¶
type ListLoadgenCachedCheckRunsRow struct {
GhID int64
NodeID string
HeadSha string
Name string
Status string
Conclusion string
DetailsUrl string
AppSlug string
StartedAt pgtype.Timestamptz
CompletedAt pgtype.Timestamptz
GhUpdatedAt pgtype.Timestamptz
SemanticVersion string
}
type ListLoadgenCachedPullRequestsRow ¶
type ListLoadgenCachedPullRequestsRow struct {
GhID pgtype.Int8
NodeID string
Number int32
Title string
State string
Draft bool
AuthorLogin string
ReviewDecision string
MergeableState string
HeadRef string
HeadSha string
BaseRef string
BaseSha string
StackNumber pgtype.Int4
StackPosition pgtype.Int4
GhUpdatedAt pgtype.Timestamptz
}
type ListLoadgenDroppedDeliveriesRow ¶
type ListLoadgenDroppedDeliveriesRow struct {
DeliveryGuid string
ReceivedAt pgtype.Timestamptz
Status string
}
type ListStaleClosedPullRequestsParams ¶
type ListStaleClosedPullRequestsParams struct {
InstallationID int64
StaleBefore pgtype.Timestamptz
}
type ListStaleClosedPullRequestsRow ¶
type ListStaleClosedPullRequestsRow struct {
RepoFullName string
Number int32
LastCheckedAt pgtype.Timestamptz
}
type ListStaleClosedStacksParams ¶
type ListStaleClosedStacksParams struct {
InstallationID int64
StaleBefore pgtype.Timestamptz
}
type ListStaleClosedStacksRow ¶
type ListStaleClosedStacksRow struct {
RepoFullName string
Number int32
LastCheckedAt pgtype.Timestamptz
}
type ListStaleOpenPullRequestsParams ¶
type ListStaleOpenPullRequestsParams struct {
InstallationID int64
StaleBefore pgtype.Timestamptz
}
type ListStaleOpenPullRequestsRow ¶
type ListStaleOpenPullRequestsRow struct {
RepoFullName string
Number int32
LastCheckedAt pgtype.Timestamptz
}
type ListStaleOpenStacksParams ¶
type ListStaleOpenStacksParams struct {
InstallationID int64
StaleBefore pgtype.Timestamptz
}
type ListStaleOpenStacksRow ¶
type ListStaleOpenStacksRow struct {
RepoFullName string
Number int32
LastCheckedAt pgtype.Timestamptz
}
type ListStaleRepoRulesParams ¶
type ListStaleRepoRulesParams struct {
InstallationID int64
StaleBefore pgtype.Timestamptz
}
type ListStaleRepoRulesRow ¶
type ListStaleRepoRulesRow struct {
FullName string
LastCheckedAt pgtype.Timestamptz
}
type MarkDerivationDirtyParams ¶
type MarkDerivationDirtyParams struct {
MarkedAt pgtype.Timestamptz
ScopeKeys []string
}
type NullRiverJobState ¶
type NullRiverJobState struct {
RiverJobState RiverJobState
Valid bool // Valid is true if RiverJobState is not NULL
}
func (*NullRiverJobState) Scan ¶
func (ns *NullRiverJobState) Scan(value interface{}) error
Scan implements the Scanner interface.
type OperationHeartbeat ¶
type OperationHeartbeat struct {
InstallationID int64
Component string
Operation string
SuccessCount int64
LastSuccessAt pgtype.Timestamptz
SampleCount int64
LastSampleAt pgtype.Timestamptz
}
type PageChangeEventsParams ¶
type PageChangeEventsRow ¶
type PruneChangeEventsParams ¶
type PruneChangeEventsParams struct {
Cutoff pgtype.Timestamptz
BatchSize int32
}
type PruneResolvedDriftFindingBatchParams ¶
type PruneResolvedDriftFindingBatchParams struct {
Cutoff pgtype.Timestamptz
BatchSize int32
}
type PruneWebhookDeliveryPayloadBatchParams ¶
type PruneWebhookDeliveryPayloadBatchParams struct {
PrunedAt pgtype.Timestamptz
Cutoff pgtype.Timestamptz
BatchSize int32
}
type PullRequest ¶
type PullRequest struct {
ID int64
RepoID int64
GhID pgtype.Int8
NodeID string
Number int32
Title string
State string
Draft bool
AuthorLogin string
HeadRef string
HeadSha string
BaseRef string
BaseSha string
ReviewDecision string
MergeableState string
StackNumber pgtype.Int4
StackPosition pgtype.Int4
GhUpdatedAt pgtype.Timestamptz
SyncedAt pgtype.Timestamptz
Etag string
SyncSource string
TombstonedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
DisplayUntil pgtype.Timestamptz
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AcquireEntityAdvisoryLock ¶
C-C1 transaction-scoped serialization for direct writer calls.
func (*Queries) AcquireEntitySessionLock ¶
Fetch workers use a dedicated connection and hold this lock from before observation until after the state transaction commits.
func (*Queries) AcquireInstallationBudgetLease ¶
func (q *Queries) AcquireInstallationBudgetLease(ctx context.Context, arg AcquireInstallationBudgetLeaseParams) ([]AcquireInstallationBudgetLeaseRow, error)
func (*Queries) AcquireOrRenewStreamWatermarkLease ¶
func (*Queries) AcquireOutboxWatermarkFence ¶
func (*Queries) AcquireOutboxWriterFence ¶
func (*Queries) AdvanceBackfillCursor ¶
func (q *Queries) AdvanceBackfillCursor(ctx context.Context, arg AdvanceBackfillCursorParams) (BackfillCursor, error)
func (*Queries) AdvanceGapHealCursor ¶
func (q *Queries) AdvanceGapHealCursor(ctx context.Context, arg AdvanceGapHealCursorParams) (GapHealCursor, error)
func (*Queries) AdvanceInstallationBackfillCursor ¶
func (q *Queries) AdvanceInstallationBackfillCursor(ctx context.Context, arg AdvanceInstallationBackfillCursorParams) (InstallationBackfillCursor, error)
func (*Queries) AdvanceSweepCursor ¶
func (q *Queries) AdvanceSweepCursor(ctx context.Context, arg AdvanceSweepCursorParams) (SweepCursor, error)
func (*Queries) AppendAcceptedCheckHistory ¶
func (q *Queries) AppendAcceptedCheckHistory(ctx context.Context, arg AppendAcceptedCheckHistoryParams) error
func (*Queries) ApplyDerivedWorkItemBatch ¶
func (*Queries) BumpRefreshIntentGenerations ¶
func (q *Queries) BumpRefreshIntentGenerations(ctx context.Context, intents []byte) ([]BumpRefreshIntentGenerationsRow, error)
Bump each coalesced key once in the same transaction that inserts its River job. Workers snapshot it when they begin authoritative refresh work.
func (*Queries) ClaimDerivationDirtyScopes ¶
func (*Queries) ClaimWebhookDeliveries ¶
func (q *Queries) ClaimWebhookDeliveries(ctx context.Context, batchSize int32) ([]WebhookDelivery, error)
C-P2/C-O2: claim a bounded batch without blocking another dispatcher. The processing transition and attempt increment remain in the caller's batch transaction, so a crashed dispatcher rolls the claim back to pending.
func (*Queries) ClearDerivationDirtyScopes ¶
func (*Queries) CollectBudgetMetrics ¶
func (*Queries) CollectCacheStalenessMetrics ¶
func (*Queries) CollectConsumerStreamMetrics ¶
func (q *Queries) CollectConsumerStreamMetrics(ctx context.Context) ([]CollectConsumerStreamMetricsRow, error)
func (*Queries) CollectDeliveryMetrics ¶
func (q *Queries) CollectDeliveryMetrics(ctx context.Context) (CollectDeliveryMetricsRow, error)
Every aggregate here is per-status so that it rides webhook_deliveries_unfinished_received_idx (status, received_at) WHERE status IN ('pending','processing','parked'). Aggregate FILTER clauses block both the min/max index optimisation and the partial index's predicate proof, so the older single-pass form seq-scanned the whole delivery table on every metrics scrape. LEAST() ignores NULLs, so LEAST(min pending, min processing) is exactly the old min(received_at) FILTER (WHERE status IN ('pending','processing')).
func (*Queries) CollectDriftMetrics ¶
func (*Queries) CollectOperationHeartbeatMetrics ¶
func (*Queries) CollectPrunableOutboxMetrics ¶
func (*Queries) CollectRiverQueueDepthMetrics ¶
func (q *Queries) CollectRiverQueueDepthMetrics(ctx context.Context) ([]CollectRiverQueueDepthMetricsRow, error)
func (*Queries) CollectStreamWatermarkMetrics ¶
func (q *Queries) CollectStreamWatermarkMetrics(ctx context.Context) (CollectStreamWatermarkMetricsRow, error)
func (*Queries) CollectSweepMetrics ¶
func (*Queries) CollectTombstoneMetrics ¶
func (q *Queries) CollectTombstoneMetrics(ctx context.Context) ([]CollectTombstoneMetricsRow, error)
func (*Queries) CompleteGapHealCursor ¶
func (q *Queries) CompleteGapHealCursor(ctx context.Context, arg CompleteGapHealCursorParams) (GapHealCursor, error)
func (*Queries) CompleteRefreshIntentGeneration ¶
func (q *Queries) CompleteRefreshIntentGeneration(ctx context.Context, arg CompleteRefreshIntentGenerationParams) error
func (*Queries) CompleteSweepCursor ¶
func (q *Queries) CompleteSweepCursor(ctx context.Context, arg CompleteSweepCursorParams) (SweepCursor, error)
func (*Queries) CountDerivationDirty ¶
func (*Queries) CountDriftFindings ¶
func (*Queries) CountLoadgenRunDeliveries ¶
func (*Queries) CountPendingBackfillChildren ¶
func (*Queries) CountPendingInstallationRepos ¶
func (*Queries) CountWebhookDeliveriesByStatus ¶
func (*Queries) DeleteCheckHistoryBatch ¶
func (*Queries) DeleteLoadgenConsumerCursor ¶
func (q *Queries) DeleteLoadgenConsumerCursor(ctx context.Context, arg DeleteLoadgenConsumerCursorParams) error
func (*Queries) EnsureBackfillCursor ¶
func (q *Queries) EnsureBackfillCursor(ctx context.Context, arg EnsureBackfillCursorParams) (BackfillCursor, error)
func (*Queries) EnsureConsumerCursor ¶
func (q *Queries) EnsureConsumerCursor(ctx context.Context, arg EnsureConsumerCursorParams) error
func (*Queries) EnsureGapHealCursor ¶
func (*Queries) EnsureInstallationBackfillCursor ¶
func (*Queries) EnsureInstallationBudget ¶
func (q *Queries) EnsureInstallationBudget(ctx context.Context, arg EnsureInstallationBudgetParams) error
func (*Queries) EnsureSweepCursor ¶
func (q *Queries) EnsureSweepCursor(ctx context.Context, arg EnsureSweepCursorParams) (SweepCursor, error)
func (*Queries) EscalateOpenDriftFinding ¶
func (q *Queries) EscalateOpenDriftFinding(ctx context.Context, arg EscalateOpenDriftFindingParams) (DriftFinding, error)
func (*Queries) GetBackfillCursor ¶
func (q *Queries) GetBackfillCursor(ctx context.Context, arg GetBackfillCursorParams) (BackfillCursor, error)
func (*Queries) GetBackfillCursorForUpdate ¶
func (q *Queries) GetBackfillCursorForUpdate(ctx context.Context, arg GetBackfillCursorForUpdateParams) (BackfillCursor, error)
func (*Queries) GetCachedEntitySnapshot ¶
func (q *Queries) GetCachedEntitySnapshot(ctx context.Context, arg GetCachedEntitySnapshotParams) (GetCachedEntitySnapshotRow, error)
func (*Queries) GetCheckRunsFetchMetadata ¶
func (q *Queries) GetCheckRunsFetchMetadata(ctx context.Context, arg GetCheckRunsFetchMetadataParams) (GetCheckRunsFetchMetadataRow, error)
C-B4: the first-page validator is shared by every check row in one repository/head-SHA listing. Prefer the newest observation when rows span multiple refreshes, including a fully tombstoned listing.
func (*Queries) GetConsumerCursorForUpdate ¶
func (*Queries) GetDatabaseClock ¶
func (*Queries) GetDriftFinding ¶
func (*Queries) GetDriftSampleCursor ¶
func (*Queries) GetGapHealCursorForUpdate ¶
func (*Queries) GetInstallationBackfillCursor ¶
func (*Queries) GetInstallationBackfillCursorForUpdate ¶
func (*Queries) GetLoadgenCacheSeedState ¶
func (*Queries) GetOpenDriftFindingByHash ¶
func (q *Queries) GetOpenDriftFindingByHash(ctx context.Context, arg GetOpenDriftFindingByHashParams) (DriftFinding, error)
func (*Queries) GetPullRequestByIdentity ¶
func (q *Queries) GetPullRequestByIdentity(ctx context.Context, arg GetPullRequestByIdentityParams) (GetPullRequestByIdentityRow, error)
func (*Queries) GetPullRequestByKey ¶
func (q *Queries) GetPullRequestByKey(ctx context.Context, arg GetPullRequestByKeyParams) (GetPullRequestByKeyRow, error)
func (*Queries) GetPullRequestFetchMetadata ¶
func (q *Queries) GetPullRequestFetchMetadata(ctx context.Context, arg GetPullRequestFetchMetadataParams) (GetPullRequestFetchMetadataRow, error)
func (*Queries) GetRefreshIntentGenerationForUpdate ¶
func (q *Queries) GetRefreshIntentGenerationForUpdate(ctx context.Context, arg GetRefreshIntentGenerationForUpdateParams) (int64, error)
Workers lock the generation before transactionally completing their River job. A concurrent dispatcher therefore bumps either before the recheck or after completion, when it can insert a fresh job.
func (*Queries) GetRefreshIntentState ¶
func (q *Queries) GetRefreshIntentState(ctx context.Context, arg GetRefreshIntentStateParams) (GetRefreshIntentStateRow, error)
func (*Queries) GetRepoByFullName ¶
func (*Queries) GetRepoByGitHubID ¶
func (*Queries) GetRepoRulesFetchMetadata ¶
func (*Queries) GetStackByIdentity ¶
func (q *Queries) GetStackByIdentity(ctx context.Context, arg GetStackByIdentityParams) (GetStackByIdentityRow, error)
func (*Queries) GetStackByKey ¶
func (q *Queries) GetStackByKey(ctx context.Context, arg GetStackByKeyParams) (GetStackByKeyRow, error)
func (*Queries) GetStackFetchMetadata ¶
func (q *Queries) GetStackFetchMetadata(ctx context.Context, arg GetStackFetchMetadataParams) (GetStackFetchMetadataRow, error)
func (*Queries) GetStreamPrunedThroughSequence ¶
func (*Queries) GetStreamSafeSequence ¶
func (*Queries) GetSweepCursor ¶
func (q *Queries) GetSweepCursor(ctx context.Context, arg GetSweepCursorParams) (SweepCursor, error)
func (*Queries) GetSweepCursorForUpdate ¶
func (q *Queries) GetSweepCursorForUpdate(ctx context.Context, arg GetSweepCursorForUpdateParams) (SweepCursor, error)
func (*Queries) GetSweepPage ¶
func (*Queries) GetWebhookDelivery ¶
func (*Queries) HasOutstandingRefresh ¶
func (*Queries) InsertChangeEvent ¶
func (*Queries) InsertDriftFinding ¶
func (q *Queries) InsertDriftFinding(ctx context.Context, arg InsertDriftFindingParams) (DriftFinding, error)
func (*Queries) InsertSweepSeenKeys ¶
func (*Queries) InsertWebhookDelivery ¶
func (q *Queries) InsertWebhookDelivery(ctx context.Context, arg InsertWebhookDeliveryParams) (int64, error)
C-I3: duplicate deliveries are free no-ops.
func (*Queries) IsInstallationBackfillDone ¶
func (q *Queries) IsInstallationBackfillDone(ctx context.Context, installationID int64) (bool, error)
Done means SETTLED: the installation cursor alone flips 'done' while per-repo child seeding is still in flight, and drift sampling in that window compares half-seeded entities against upstream truth.
func (*Queries) ListCachedPRMemberships ¶
func (q *Queries) ListCachedPRMemberships(ctx context.Context, arg ListCachedPRMembershipsParams) ([]ListCachedPRMembershipsRow, error)
func (*Queries) ListExistingWebhookDeliveryGUIDs ¶
func (*Queries) ListLiveOpenPullRequestNumbers ¶
func (*Queries) ListLiveRepositoryNames ¶
func (*Queries) ListLiveStackNumbers ¶
func (*Queries) ListLoadgenCachedCheckRuns ¶
func (*Queries) ListLoadgenCachedPullRequests ¶
func (*Queries) ListLoadgenCachedReviewThreads ¶
func (*Queries) ListLoadgenCachedStacks ¶
func (*Queries) ListLoadgenDroppedDeliveries ¶
func (*Queries) ListMissingSweepEntityKeys ¶
func (q *Queries) ListMissingSweepEntityKeys(ctx context.Context, arg ListMissingSweepEntityKeysParams) ([]string, error)
C-R3/Q13: disappearance candidates are cached live entities absent from the row-oriented membership set accumulated by the completed listing.
func (*Queries) ListPRScopesByHeadSHA ¶
func (q *Queries) ListPRScopesByHeadSHA(ctx context.Context, arg ListPRScopesByHeadSHAParams) ([]ListPRScopesByHeadSHARow, error)
func (*Queries) ListPRsAffectedByBranch ¶
func (q *Queries) ListPRsAffectedByBranch(ctx context.Context, arg ListPRsAffectedByBranchParams) ([]ListPRsAffectedByBranchRow, error)
func (*Queries) ListParkedWebhookDeliveries ¶
func (q *Queries) ListParkedWebhookDeliveries(ctx context.Context, resultLimit int32) ([]WebhookDelivery, error)
C-I5: dead-letter deliveries are explicitly queryable for operations and replay tooling.
func (*Queries) ListRepositoryDerivationScopes ¶
func (*Queries) ListSeenBackfillRefreshKeys ¶
func (*Queries) ListStacksAffectedByBranch ¶
func (*Queries) ListStaleClosedPullRequests ¶
func (q *Queries) ListStaleClosedPullRequests(ctx context.Context, arg ListStaleClosedPullRequestsParams) ([]ListStaleClosedPullRequestsRow, error)
func (*Queries) ListStaleClosedStacks ¶
func (q *Queries) ListStaleClosedStacks(ctx context.Context, arg ListStaleClosedStacksParams) ([]ListStaleClosedStacksRow, error)
func (*Queries) ListStaleOpenPullRequests ¶
func (q *Queries) ListStaleOpenPullRequests(ctx context.Context, arg ListStaleOpenPullRequestsParams) ([]ListStaleOpenPullRequestsRow, error)
func (*Queries) ListStaleOpenStacks ¶
func (q *Queries) ListStaleOpenStacks(ctx context.Context, arg ListStaleOpenStacksParams) ([]ListStaleOpenStacksRow, error)
func (*Queries) ListStaleRepoRules ¶
func (q *Queries) ListStaleRepoRules(ctx context.Context, arg ListStaleRepoRulesParams) ([]ListStaleRepoRulesRow, error)
func (*Queries) ListSweepRepositories ¶
func (*Queries) LoadDerivationSnapshot ¶
func (*Queries) MarkCompletedBackfillChildren ¶
func (*Queries) MarkDerivationDirty ¶
func (q *Queries) MarkDerivationDirty(ctx context.Context, arg MarkDerivationDirtyParams) error
func (*Queries) PageChangeEvents ¶
func (q *Queries) PageChangeEvents(ctx context.Context, arg PageChangeEventsParams) ([]PageChangeEventsRow, error)
func (*Queries) PruneChangeEvents ¶
func (*Queries) PruneResolvedDriftFindingBatch ¶
func (*Queries) PruneWebhookDeliveryPayloadBatch ¶
func (*Queries) PublishStreamWatermark ¶
func (*Queries) ReadStreamWatermarkTarget ¶
func (*Queries) ReapOrphanedRepositorySweepCursors ¶
func (q *Queries) ReapOrphanedRepositorySweepCursors(ctx context.Context, installationID int64) (int64, error)
Q16: repository-scoped cursors use mutable names to call GitHub. Remove scopes whose current live repository identity no longer owns that name; child pages and seen keys follow via ON DELETE CASCADE.
func (*Queries) RecordConsumerResync ¶
func (q *Queries) RecordConsumerResync(ctx context.Context, arg RecordConsumerResyncParams) error
func (*Queries) RecordOperationHeartbeat ¶
func (q *Queries) RecordOperationHeartbeat(ctx context.Context, arg RecordOperationHeartbeatParams) error
func (*Queries) ReleaseEntitySessionLock ¶
func (*Queries) ReleaseInstallationBudgetLease ¶
func (*Queries) ReleaseStreamWatermarkLease ¶
func (*Queries) RenewInstallationBudgetLease ¶
func (q *Queries) RenewInstallationBudgetLease(ctx context.Context, arg RenewInstallationBudgetLeaseParams) ([]pgtype.Timestamptz, error)
func (*Queries) ReplaceCheckRuns ¶
func (*Queries) ReplaceRepoRules ¶
func (*Queries) ReplaceReviewThreads ¶
func (*Queries) RequeueParkedWebhookDeliveries ¶
func (q *Queries) RequeueParkedWebhookDeliveries(ctx context.Context, arg RequeueParkedWebhookDeliveriesParams) (int64, error)
C-I5: replay is deliberately bounded to an explicit GUID set or one event/error signature. Payload-pruned deliveries remain parked and receive an explicit refusal reason; an explicit-GUID CLI replay consequently fails its selected-vs-requeued count check instead of dispatching a nil body.
func (*Queries) ResolveOpenDriftFindings ¶
func (*Queries) RestartSweepCursorPass ¶
func (q *Queries) RestartSweepCursorPass(ctx context.Context, arg RestartSweepCursorPassParams) (SweepCursor, error)
func (*Queries) SampleCachedEntitiesAfter ¶
func (q *Queries) SampleCachedEntitiesAfter(ctx context.Context, arg SampleCachedEntitiesAfterParams) ([]SampleCachedEntitiesAfterRow, error)
Q11: the forward half of the rotating sample is a plain indexed source_id range. Detect issues a second bounded range only when this reaches the end.
The keyset is resolved against drift_entity_keys, which projects the same (installation_id, entity_kind, source_id) triples as drift_entities with no snapshot payload. Ordering drift_entities directly forced PostgreSQL to plan every UNION ALL arm for full retrieval -- an ORDER BY at this level stops the LIMIT's tuple fraction from reaching the arms -- so the 'checks' arm built a jsonb snapshot for every cached check group on every sample. The ARRAY() sub-select becomes an InitPlan, whose Param IS pushed into the arms as an indexable source_id qual, so only the sampled rows are built. source_id is unique per (installation_id, entity_kind), so the rows and their order are identical to the single-statement form.
func (*Queries) SampleCachedEntitiesThrough ¶
func (q *Queries) SampleCachedEntitiesThrough(ctx context.Context, arg SampleCachedEntitiesThroughParams) ([]SampleCachedEntitiesThroughRow, error)
The wrap half cannot overlap the forward half and retains source_id order. Same two-phase keyset shape as SampleCachedEntitiesAfter.
func (*Queries) SaveInstallationBudgetBackoff ¶
func (*Queries) SaveInstallationBudgetSnapshot ¶
func (*Queries) SetBudgetLeaseTransactionTimeouts ¶
func (*Queries) SetDriftFindingHealGeneration ¶
func (q *Queries) SetDriftFindingHealGeneration(ctx context.Context, arg SetDriftFindingHealGenerationParams) (DriftFinding, error)
func (*Queries) SetLocalLockTimeout ¶
func (*Queries) SetWebhookDeliveryResults ¶
C-P2: finish the entire claimed batch with one set-based status update.
func (*Queries) ShowSynchronousCommit ¶
func (*Queries) StartGapHealCursor ¶
func (q *Queries) StartGapHealCursor(ctx context.Context, arg StartGapHealCursorParams) (GapHealCursor, error)
func (*Queries) StartSweepCursor ¶
func (q *Queries) StartSweepCursor(ctx context.Context, arg StartSweepCursorParams) (SweepCursor, error)
func (*Queries) TombstonePullRequest ¶
func (q *Queries) TombstonePullRequest(ctx context.Context, arg TombstonePullRequestParams) (PullRequest, error)
func (*Queries) TombstoneRepository ¶
func (q *Queries) TombstoneRepository(ctx context.Context, arg TombstoneRepositoryParams) (Repo, error)
C-R3 repository disappearance is authoritative only after the installation listing omits it and this entity fetch confirms 404.
func (*Queries) TombstoneStack ¶
func (*Queries) TouchCheckRunsCheckedAt ¶
func (q *Queries) TouchCheckRunsCheckedAt(ctx context.Context, arg TouchCheckRunsCheckedAtParams) error
func (*Queries) TouchOpenDriftFinding ¶
func (q *Queries) TouchOpenDriftFinding(ctx context.Context, arg TouchOpenDriftFindingParams) (DriftFinding, error)
func (*Queries) TouchPullRequestCheckedAt ¶
func (q *Queries) TouchPullRequestCheckedAt(ctx context.Context, arg TouchPullRequestCheckedAtParams) error
func (*Queries) TouchRepoRulesCheckedAt ¶
func (q *Queries) TouchRepoRulesCheckedAt(ctx context.Context, arg TouchRepoRulesCheckedAtParams) error
func (*Queries) TouchRepositoryCheckedAt ¶
func (q *Queries) TouchRepositoryCheckedAt(ctx context.Context, arg TouchRepositoryCheckedAtParams) error
func (*Queries) TouchReviewThreadsCheckedAt ¶
func (q *Queries) TouchReviewThreadsCheckedAt(ctx context.Context, arg TouchReviewThreadsCheckedAtParams) error
func (*Queries) TouchStackCheckedAt ¶
func (q *Queries) TouchStackCheckedAt(ctx context.Context, arg TouchStackCheckedAtParams) error
func (*Queries) UpdateConsumerCursor ¶
func (q *Queries) UpdateConsumerCursor(ctx context.Context, arg UpdateConsumerCursorParams) error
func (*Queries) UpsertBackfillChildren ¶
func (q *Queries) UpsertBackfillChildren(ctx context.Context, arg UpsertBackfillChildrenParams) error
func (*Queries) UpsertDriftSampleCursor ¶
func (q *Queries) UpsertDriftSampleCursor(ctx context.Context, arg UpsertDriftSampleCursorParams) error
func (*Queries) UpsertPullRequestWriteIfNewer ¶
func (q *Queries) UpsertPullRequestWriteIfNewer(ctx context.Context, arg UpsertPullRequestWriteIfNewerParams) (PullRequest, error)
func (*Queries) UpsertRepoRuleSyncState ¶
func (q *Queries) UpsertRepoRuleSyncState(ctx context.Context, arg UpsertRepoRuleSyncStateParams) error
func (*Queries) UpsertRepositoryAlias ¶
func (q *Queries) UpsertRepositoryAlias(ctx context.Context, arg UpsertRepositoryAliasParams) error
func (*Queries) UpsertRepositoryWriteIfNewer ¶
func (*Queries) UpsertStackWriteIfNewer ¶
func (*Queries) UpsertSweepPage ¶
func (q *Queries) UpsertSweepPage(ctx context.Context, arg UpsertSweepPageParams) error
type RefreshIntentGeneration ¶
type RefreshIntentGeneration struct {
Kind string
RefreshKey string
Generation int64
UpdatedAt pgtype.Timestamptz
CompletedGeneration int64
DeadlineAt pgtype.Timestamptz
EventReceivedAt pgtype.Timestamptz
}
type ReplaceCheckRunsParams ¶
type ReplaceCheckRunsParams struct {
CheckRuns []byte
RepoID int64
HeadSha string
SyncedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
Etag string
SyncSource string
}
type ReplaceRepoRulesParams ¶
type ReplaceRepoRulesParams struct {
Rules []byte
RepoID int64
SyncedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
Etag string
SyncSource string
}
type ReplaceReviewThreadsParams ¶
type ReplaceReviewThreadsParams struct {
Threads []byte
RepoID int64
PrNumber int32
HeadSha string
SyncedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
Etag string
SyncSource string
}
type Repo ¶
type Repo struct {
ID int64
InstallationID int64
OrgID int64
GhID int64
NodeID string
Owner string
Name string
FullName string
DefaultBranch string
Archived bool
GhUpdatedAt pgtype.Timestamptz
HeadSha string
SyncedAt pgtype.Timestamptz
Etag string
SyncSource string
TombstonedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
}
type RepoAlias ¶
type RepoAlias struct {
FullName string
RepoID int64
FirstSeenAt pgtype.Timestamptz
LastSeenAt pgtype.Timestamptz
}
type RepoRule ¶
type RepoRule struct {
RepoID int64
RuleKey string
Rule []byte
GhUpdatedAt pgtype.Timestamptz
HeadSha string
SyncedAt pgtype.Timestamptz
Etag string
SyncSource string
TombstonedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
}
type RepoRuleSyncState ¶
type RepoRuleSyncState struct {
RepoID int64
Etag string
LastCheckedAt pgtype.Timestamptz
}
type ResolveOpenDriftFindingsParams ¶
type ResolveOpenDriftFindingsParams struct {
ResolvedAt pgtype.Timestamptz
InstallationID int64
EntityKind string
EntityKey string
}
type ReviewThread ¶
type ReviewThread struct {
ID string
RepoID int64
PrNumber int32
IsResolved bool
IsOutdated bool
Path string
Line pgtype.Int4
Comments []byte
GhUpdatedAt pgtype.Timestamptz
HeadSha string
SyncedAt pgtype.Timestamptz
Etag string
SyncSource string
TombstonedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
}
type RiverJob ¶
type RiverJob struct {
ID int64
State RiverJobState
Attempt int16
MaxAttempts int16
AttemptedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
FinalizedAt pgtype.Timestamptz
ScheduledAt pgtype.Timestamptz
Priority int16
Args []byte
AttemptedBy []string
Errors [][]byte
Kind string
Metadata []byte
Queue string
Tags []string
UniqueKey []byte
UniqueStates pgtype.Bits
}
type RiverJobState ¶
type RiverJobState string
const ( RiverJobStateAvailable RiverJobState = "available" RiverJobStateCancelled RiverJobState = "cancelled" RiverJobStateCompleted RiverJobState = "completed" RiverJobStateDiscarded RiverJobState = "discarded" RiverJobStatePending RiverJobState = "pending" RiverJobStateRetryable RiverJobState = "retryable" RiverJobStateRunning RiverJobState = "running" RiverJobStateScheduled RiverJobState = "scheduled" )
func (*RiverJobState) Scan ¶
func (e *RiverJobState) Scan(src interface{}) error
type SaveInstallationBudgetBackoffParams ¶
type SaveInstallationBudgetBackoffParams struct {
BackoffUntil pgtype.Timestamptz
InstallationID int64
LeaseToken string
}
type Stack ¶
type Stack struct {
ID int64
RepoID int64
GhID pgtype.Int8
NodeID string
Number int32
BaseRef string
BaseSha string
Open bool
Entries []byte
GhUpdatedAt pgtype.Timestamptz
HeadSha string
SyncedAt pgtype.Timestamptz
Etag string
SyncSource string
TombstonedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
DisplayUntil pgtype.Timestamptz
}
type StartGapHealCursorParams ¶
type StartGapHealCursorParams struct {
Cutoff pgtype.Timestamptz
StartedAt pgtype.Timestamptz
InstallationID int64
}
type StartSweepCursorParams ¶
type StreamHorizon ¶
type StreamHorizon struct {
Stream string
PrunedThroughSeq int64
UpdatedAt pgtype.Timestamptz
}
type StreamWatermark ¶
type SweepCursor ¶
type SweepCursor struct {
InstallationID int64
SweepKind string
ScopeKey string
Cursor string
StartedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
CompletedAt pgtype.Timestamptz
PassNewCount int32
}
type SweepSeenKey ¶
type TombstonePullRequestParams ¶
type TombstonePullRequestParams struct {
TombstonedAt pgtype.Timestamptz
SyncedAt pgtype.Timestamptz
SyncSource string
RepoID int64
PrNumber int32
}
type TombstoneRepositoryParams ¶
type TombstoneRepositoryParams struct {
TombstonedAt pgtype.Timestamptz
SyncedAt pgtype.Timestamptz
SyncSource string
GhID int64
}
type TombstoneStackParams ¶
type TombstoneStackParams struct {
TombstonedAt pgtype.Timestamptz
SyncedAt pgtype.Timestamptz
SyncSource string
RepoID int64
StackNumber int32
}
type TouchCheckRunsCheckedAtParams ¶
type TouchCheckRunsCheckedAtParams struct {
CheckedAt pgtype.Timestamptz
Etag string
RepoID int64
HeadSha string
}
type TouchPullRequestCheckedAtParams ¶
type TouchPullRequestCheckedAtParams struct {
CheckedAt pgtype.Timestamptz
Etag string
RepoID int64
PrNumber int32
}
type TouchRepoRulesCheckedAtParams ¶
type TouchRepoRulesCheckedAtParams struct {
CheckedAt pgtype.Timestamptz
RepoID int64
}
type TouchRepositoryCheckedAtParams ¶
type TouchRepositoryCheckedAtParams struct {
CheckedAt pgtype.Timestamptz
Etag string
GhID int64
}
type TouchReviewThreadsCheckedAtParams ¶
type TouchReviewThreadsCheckedAtParams struct {
CheckedAt pgtype.Timestamptz
RepoID int64
PrNumber int32
}
type TouchStackCheckedAtParams ¶
type TouchStackCheckedAtParams struct {
CheckedAt pgtype.Timestamptz
Etag string
RepoID int64
StackNumber int32
}
type UpsertPullRequestWriteIfNewerParams ¶
type UpsertPullRequestWriteIfNewerParams struct {
RepoID int64
GhID pgtype.Int8
NodeID string
PrNumber int32
Title string
State string
Draft bool
AuthorLogin string
HeadRef string
HeadSha string
BaseRef string
BaseSha string
ReviewDecision string
MergeableState string
MembershipKnown bool
StackNumber pgtype.Int4
StackPosition pgtype.Int4
GhUpdatedAt pgtype.Timestamptz
SyncedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
Etag string
SyncSource string
DisplayWindowSeconds int32
}
type UpsertRepoRuleSyncStateParams ¶
type UpsertRepoRuleSyncStateParams struct {
RepoID int64
Etag string
CheckedAt pgtype.Timestamptz
}
type UpsertRepositoryAliasParams ¶
type UpsertRepositoryAliasParams struct {
FullName string
RepoID int64
ObservedAt pgtype.Timestamptz
}
type UpsertRepositoryWriteIfNewerParams ¶
type UpsertRepositoryWriteIfNewerParams struct {
InstallationID int64
OrgID int64
GhID int64
NodeID string
Owner string
Name string
FullName string
DefaultBranch string
Archived bool
GhUpdatedAt pgtype.Timestamptz
HeadSha string
SyncedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
Etag string
SyncSource string
}
type UpsertStackWriteIfNewerParams ¶
type UpsertStackWriteIfNewerParams struct {
RepoID int64
GhID pgtype.Int8
NodeID string
StackNumber int32
BaseRef string
BaseSha string
Open bool
Entries []byte
GhUpdatedAt pgtype.Timestamptz
HeadSha string
SyncedAt pgtype.Timestamptz
LastCheckedAt pgtype.Timestamptz
Etag string
SyncSource string
DisplayWindowSeconds int32
}