Documentation ¶
Index ¶
- type TestAdapter
- func (ta *TestAdapter) JobCompleteMany(ctx context.Context, jobs ...dbadapter.JobToComplete) error
- func (ta *TestAdapter) JobCompleteManyTx(ctx context.Context, tx pgx.Tx, jobs ...dbadapter.JobToComplete) error
- func (ta *TestAdapter) JobGetAvailable(ctx context.Context, queueName string, limit int32) ([]*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobGetAvailableTx(ctx context.Context, tx pgx.Tx, queueName string, limit int32) ([]*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobInsert(ctx context.Context, params *dbadapter.JobInsertParams) (*dbadapter.JobInsertResult, error)
- func (ta *TestAdapter) JobInsertMany(ctx context.Context, params []*dbadapter.JobInsertParams) (int64, error)
- func (ta *TestAdapter) JobInsertManyTx(ctx context.Context, tx pgx.Tx, params []*dbadapter.JobInsertParams) (int64, error)
- func (ta *TestAdapter) JobInsertTx(ctx context.Context, tx pgx.Tx, params *dbadapter.JobInsertParams) (*dbadapter.JobInsertResult, error)
- func (ta *TestAdapter) JobSetCancelledIfRunning(ctx context.Context, id int64, finalizedAt time.Time, err []byte) (*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobSetCompletedIfRunning(ctx context.Context, job dbadapter.JobToComplete) (*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobSetCompletedTx(ctx context.Context, tx pgx.Tx, id int64, completedAt time.Time) (*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobSetDiscardedIfRunning(ctx context.Context, id int64, finalizedAt time.Time, err []byte) (*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobSetErroredIfRunning(ctx context.Context, id int64, scheduledAt time.Time, err []byte) (*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobSetSnoozedIfRunning(ctx context.Context, id int64, scheduledAt time.Time) (*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) LeadershipAttemptElect(ctx context.Context, alreadyElected bool, name, leaderID string, ...) (bool, error)
- func (ta *TestAdapter) LeadershipResign(ctx context.Context, name, leaderID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestAdapter ¶
type TestAdapter struct { JobCompleteManyCalled bool JobCompleteManyTxCalled bool JobInsertCalled bool JobInsertTxCalled bool JobInsertManyCalled bool JobInsertManyTxCalled bool JobGetAvailableCalled bool JobGetAvailableTxCalled bool JobSetCancelledIfRunningCalled bool JobSetCompletedIfRunningCalled bool JobSetCompletedTxCalled bool JobSetDiscardedIfRunningCalled bool JobSetErroredIfRunningCalled bool JobSetSnoozedIfRunningCalled bool LeadershipAttemptElectCalled bool LeadershipResignedCalled bool JobCompleteManyFunc func(ctx context.Context, jobs ...dbadapter.JobToComplete) error JobCompleteManyTxFunc func(ctx context.Context, tx pgx.Tx, jobs ...dbadapter.JobToComplete) error JobInsertFunc func(ctx context.Context, params *dbadapter.JobInsertParams) (*dbadapter.JobInsertResult, error) JobInsertTxFunc func(ctx context.Context, tx pgx.Tx, params *dbadapter.JobInsertParams) (*dbadapter.JobInsertResult, error) JobInsertManyFunc func(ctx context.Context, params []*dbadapter.JobInsertParams) (int64, error) JobInsertManyTxFunc func(ctx context.Context, tx pgx.Tx, params []*dbadapter.JobInsertParams) (int64, error) JobGetAvailableFunc func(ctx context.Context, queueName string, limit int32) ([]*dbsqlc.RiverJob, error) JobGetAvailableTxFunc func(ctx context.Context, tx pgx.Tx, queueName string, limit int32) ([]*dbsqlc.RiverJob, error) JobSetCancelledIfRunningFunc func(ctx context.Context, id int64, finalizedAt time.Time, err []byte) (*dbsqlc.RiverJob, error) JobSetCompletedIfRunningFunc func(ctx context.Context, job dbadapter.JobToComplete) (*dbsqlc.RiverJob, error) JobSetCompletedTxFunc func(ctx context.Context, tx pgx.Tx, id int64, completedAt time.Time) (*dbsqlc.RiverJob, error) JobSetDiscardedIfRunningFunc func(ctx context.Context, id int64, finalizedAt time.Time, err []byte) (*dbsqlc.RiverJob, error) JobSetErroredIfRunningFunc func(ctx context.Context, id int64, scheduledAt time.Time, err []byte) (*dbsqlc.RiverJob, error) JobSetSnoozedIfRunningFunc func(ctx context.Context, id int64, scheduledAt time.Time) (*dbsqlc.RiverJob, error) LeadershipAttemptElectFunc func(ctx context.Context) (bool, error) LeadershipResignFunc func(ctx context.Context, name string, leaderID string) error // contains filtered or unexported fields }
TestAdapter is an Adapter that allows any of its methods to be overridden, automatically falling back to the fallthroughAdapter if the method is not overridden.
func (*TestAdapter) JobCompleteMany ¶
func (ta *TestAdapter) JobCompleteMany(ctx context.Context, jobs ...dbadapter.JobToComplete) error
func (*TestAdapter) JobCompleteManyTx ¶
func (ta *TestAdapter) JobCompleteManyTx(ctx context.Context, tx pgx.Tx, jobs ...dbadapter.JobToComplete) error
func (*TestAdapter) JobGetAvailable ¶
func (*TestAdapter) JobGetAvailableTx ¶
func (*TestAdapter) JobInsert ¶
func (ta *TestAdapter) JobInsert(ctx context.Context, params *dbadapter.JobInsertParams) (*dbadapter.JobInsertResult, error)
func (*TestAdapter) JobInsertMany ¶
func (ta *TestAdapter) JobInsertMany(ctx context.Context, params []*dbadapter.JobInsertParams) (int64, error)
func (*TestAdapter) JobInsertManyTx ¶
func (ta *TestAdapter) JobInsertManyTx(ctx context.Context, tx pgx.Tx, params []*dbadapter.JobInsertParams) (int64, error)
func (*TestAdapter) JobInsertTx ¶
func (ta *TestAdapter) JobInsertTx(ctx context.Context, tx pgx.Tx, params *dbadapter.JobInsertParams) (*dbadapter.JobInsertResult, error)
func (*TestAdapter) JobSetCancelledIfRunning ¶
func (*TestAdapter) JobSetCompletedIfRunning ¶
func (ta *TestAdapter) JobSetCompletedIfRunning(ctx context.Context, job dbadapter.JobToComplete) (*dbsqlc.RiverJob, error)
func (*TestAdapter) JobSetCompletedTx ¶
func (*TestAdapter) JobSetDiscardedIfRunning ¶
func (*TestAdapter) JobSetErroredIfRunning ¶
func (*TestAdapter) JobSetSnoozedIfRunning ¶
func (*TestAdapter) LeadershipAttemptElect ¶
func (*TestAdapter) LeadershipResign ¶
func (ta *TestAdapter) LeadershipResign(ctx context.Context, name, leaderID string) error
Click to show internal directories.
Click to hide internal directories.