Documentation ¶
Index ¶
- type TestAdapter
- func (ta *TestAdapter) JobCancel(ctx context.Context, id int64) (*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobCancelTx(ctx context.Context, tx pgx.Tx, id int64) (*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobGet(ctx context.Context, id int64) (*dbsqlc.RiverJob, 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) JobGetTx(ctx context.Context, tx pgx.Tx, id int64) (*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) JobList(ctx context.Context, params dbadapter.JobListParams) ([]*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobListTx(ctx context.Context, tx pgx.Tx, params dbadapter.JobListParams) ([]*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobRetryImmediately(ctx context.Context, id int64) (*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobRetryImmediatelyTx(ctx context.Context, tx pgx.Tx, id int64) (*dbsqlc.RiverJob, error)
- func (ta *TestAdapter) JobSetStateIfRunning(ctx context.Context, params *dbadapter.JobSetStateIfRunningParams) (*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 { JobCancelCalled bool JobCancelTxCalled bool JobInsertCalled bool JobInsertTxCalled bool JobInsertManyCalled bool JobInsertManyTxCalled bool JobGetCalled bool JobGetTxCalled bool JobGetAvailableCalled bool JobGetAvailableTxCalled bool JobListCalled bool JobListTxCalled bool JobRetryImmediatelyCalled bool JobRetryImmediatelyTxCalled bool JobSetStateIfRunningCalled bool LeadershipAttemptElectCalled bool LeadershipResignedCalled bool JobCancelFunc func(ctx context.Context, id int64) (*dbsqlc.RiverJob, error) JobCancelTxFunc func(ctx context.Context, tx pgx.Tx, id int64) (*dbsqlc.RiverJob, 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) JobGetFunc func(ctx context.Context, id int64) (*dbsqlc.RiverJob, error) JobGetTxFunc func(ctx context.Context, tx pgx.Tx, id int64) (*dbsqlc.RiverJob, 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) JobListFunc func(ctx context.Context, params dbadapter.JobListParams) ([]*dbsqlc.RiverJob, error) JobListTxFunc func(ctx context.Context, tx pgx.Tx, params dbadapter.JobListParams) ([]*dbsqlc.RiverJob, error) JobRetryImmediatelyFunc func(ctx context.Context, id int64) (*dbsqlc.RiverJob, error) JobRetryImmediatelyTxFunc func(ctx context.Context, tx pgx.Tx, id int64) (*dbsqlc.RiverJob, error) JobSetStateIfRunningFunc func(ctx context.Context, params *dbadapter.JobSetStateIfRunningParams) (*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) JobCancelTx ¶ added in v0.0.17
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) JobList ¶ added in v0.0.17
func (ta *TestAdapter) JobList(ctx context.Context, params dbadapter.JobListParams) ([]*dbsqlc.RiverJob, error)
func (*TestAdapter) JobListTx ¶ added in v0.0.17
func (ta *TestAdapter) JobListTx(ctx context.Context, tx pgx.Tx, params dbadapter.JobListParams) ([]*dbsqlc.RiverJob, error)
func (*TestAdapter) JobRetryImmediately ¶ added in v0.0.19
func (*TestAdapter) JobRetryImmediatelyTx ¶ added in v0.0.19
func (*TestAdapter) JobSetStateIfRunning ¶ added in v0.0.13
func (ta *TestAdapter) JobSetStateIfRunning(ctx context.Context, params *dbadapter.JobSetStateIfRunningParams) (*dbsqlc.RiverJob, error)
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.