const ( // MigrationLinePro is the migration line for River Pro features. MigrationLinePro = "pro" // MigrationLineSequence is the deprecated migration line for the sequence // feature. Users should migrate to use the unified pro line instead. // // Deprecated: Use MigrationLinePro instead. MigrationLineSequence = "sequence" // MigrationLineWorkflow is the deprecated migration line for the workflow // feature. Users should migrate to use the unified pro line instead. // // Deprecated: Use MigrationLinePro instead. MigrationLineWorkflow = "workflow" )
This section is empty.
This section is empty.
type JobGetAvailableLimitedParams struct {
*riverdriver.JobGetAvailableParams
AvailablePartitionKeys []string
CurrentProducerPartitionKeys []string
CurrentProducerPartitionRunningCounts []int32
GlobalLimit int32
LocalLimit int32
PartitionByArgs []string
PartitionByKind bool
}
type PeriodicJobUpsertManyParams struct {
Jobs []*PeriodicJobUpsertParams
Schema string
}
type ProDriver[TTx any] interface { riverdriver.Driver[TTx] GetProExecutor() ProExecutor ProConfigInit(pilot riverpilot.Pilot) UnwrapProExecutor(tx TTx) ProExecutorTx }
type ProExecutor interface {
riverdriver.Executor
// BeginPro begins a new subtransaction returning a ProExecutorTx.
// ErrSubTxNotSupported may be returned if the executor is a transaction and
// the driver doesn't support subtransactions (like
// riverdriver/riverdatabasesql for database/sql).
BeginPro(ctx context.Context) (ProExecutorTx, error)
GetPendingWorkflowIDs(ctx context.Context, params *GetPendingWorkflowIDsParams) ([]*GetPendingWorkflowIDsRow, error)
JobDeadLetterDeleteByID(ctx context.Context, params *JobDeadLetterDeleteByIDParams) (*rivertype.JobRow, error)
JobDeadLetterGetAll(ctx context.Context, params *JobDeadLetterGetAllParams) ([]*rivertype.JobRow, error)
JobDeadLetterGetByID(ctx context.Context, params *JobDeadLetterGetByIDParams) (*rivertype.JobRow, error)
JobDeadLetterMoveByID(ctx context.Context, params *JobDeadLetterMoveByIDParams) (*rivertype.JobRow, error)
JobDeadLetterMoveDiscarded(ctx context.Context, params *JobDeadLetterMoveDiscardedParams) ([]*rivertype.JobRow, error)
JobDeleteByIDMany(ctx context.Context, params *JobDeleteByIDManyParams) ([]*rivertype.JobRow, error)
JobGetAvailableForBatch(ctx context.Context, params *JobGetAvailableForBatchParams) ([]*rivertype.JobRow, error)
JobGetAvailableLimited(ctx context.Context, params *JobGetAvailableLimitedParams) ([]*rivertype.JobRow, error)
JobGetAvailablePartitionKeys(ctx context.Context, params *JobGetAvailablePartitionKeysParams) ([]string, error)
JobGetByWorkflowIDAndTaskName(ctx context.Context, params *JobGetByWorkflowIDAndTaskNameParams) (*rivertype.JobRow, error)
PGTryAdvisoryXactLock(ctx context.Context, key int64) (bool, error)
PeriodicJobGetAll(ctx context.Context, params *PeriodicJobGetAllParams) ([]*PeriodicJob, error)
PeriodicJobGetByID(ctx context.Context, params *PeriodicJobGetByIDParams) (*PeriodicJob, error)
PeriodicJobInsert(ctx context.Context, params *PeriodicJobInsertParams) (*PeriodicJob, error)
PeriodicJobKeepAliveAndReap(ctx context.Context, params *PeriodicJobKeepAliveAndReapParams) ([]*PeriodicJob, error)
PeriodicJobUpsertMany(ctx context.Context, params *PeriodicJobUpsertManyParams) ([]*PeriodicJob, error)
ProducerDelete(ctx context.Context, params *ProducerDeleteParams) error
ProducerGetByID(ctx context.Context, params *ProducerGetByIDParams) (*Producer, error)
QueueGetMetadataForInsert(ctx context.Context, params *QueueGetMetadataForInsertParams) ([]*QueueGetMetadataForInsertResult, error)
ProducerInsertOrUpdate(ctx context.Context, params *ProducerInsertOrUpdateParams) (*Producer, error)
ProducerKeepAlive(ctx context.Context, params *ProducerKeepAliveParams) (*Producer, error)
ProducerListByQueue(ctx context.Context, params *ProducerListByQueueParams) ([]*ProducerListByQueueResult, error)
ProducerUpdate(ctx context.Context, params *ProducerUpdateParams) (*Producer, error)
SequenceAppendMany(ctx context.Context, params *SequenceAppendManyParams) (int, error)
SequenceList(ctx context.Context, params *SequenceListParams) ([]*Sequence, error)
// SequencePromote promotes the sequences with the given keys. It returns the
// keys of the sequences which were actually promoted.
SequencePromote(ctx context.Context, params *SequencePromoteParams) ([]string, error)
// SequencePromoteFromTable promotes sequences from the river_job_sequence
// table. It returns the keys of the sequences which were actually promoted.
SequencePromoteFromTable(ctx context.Context, params *SequencePromoteFromTableParams) (*SequencePromoteFromTableResult, error)
SequenceScanAndPromoteStalled(ctx context.Context, params *SequenceScanAndPromoteStalledParams) (*SequenceScanAndPromoteStalledResult, error)
StageWorkflowJobsMany(ctx context.Context, params *StageWorkflowJobsManyParams) ([]*rivertype.JobRow, error)
WorkflowCancel(ctx context.Context, params *WorkflowCancelParams) ([]*rivertype.JobRow, error)
WorkflowCancelWithFailedDepsMany(ctx context.Context, params *WorkflowCancelWithFailedDepsManyParams) ([]*rivertype.JobRow, error)
WorkflowJobList(ctx context.Context, params *WorkflowJobListParams) ([]*rivertype.JobRow, error)
WorkflowListActive(ctx context.Context, params *WorkflowListParams) ([]*WorkflowListItem, error)
WorkflowListAll(ctx context.Context, params *WorkflowListParams) ([]*WorkflowListItem, error)
WorkflowListInactive(ctx context.Context, params *WorkflowListParams) ([]*WorkflowListItem, error)
WorkflowLoadDepTasksAndIDs(ctx context.Context, params *WorkflowLoadDepTasksAndIDsParams) (map[string]*int64, error)
WorkflowLoadJobsWithDeps(ctx context.Context, params *WorkflowLoadJobsWithDepsParams) ([]*WorkflowTaskWithJob, error)
WorkflowLoadTaskWithDeps(ctx context.Context, params *WorkflowLoadTaskWithDepsParams) (*WorkflowTaskWithJob, error)
WorkflowLoadTasksByNames(ctx context.Context, params *WorkflowLoadTasksByNamesParams) ([]*WorkflowTask, error)
WorkflowRetry(ctx context.Context, params *WorkflowRetryParams) ([]*rivertype.JobRow, error)
WorkflowRetryLockAndCheckRunning(ctx context.Context, params *WorkflowRetryLockAndCheckRunningParams) (*WorkflowRetryLockAndCheckRunningResult, error)
}
type ProExecutorTx interface {
ProExecutor
riverdriver.ExecutorTx
}
type WorkflowRetryLockAndCheckRunningResult struct {
WorkflowIsActive bool
}
type WorkflowRetryMode string
const ( WorkflowRetryModeAll WorkflowRetryMode = "all" WorkflowRetryModeFailedOnly WorkflowRetryMode = "failed_only" WorkflowRetryModeFailedAndDownstream WorkflowRetryMode = "failed_and_downstream" )
| Path | Synopsis |
|---|---|
| riverprodatabasesql module | |
| riverprodrivertest module | |
| riverpropgxv5 module |