Documentation
¶
Index ¶
- type AttemptError
- type DBTX
- type JobCancelParams
- type JobDeleteBeforeParams
- type JobGetAvailableParams
- type JobGetByKindAndUniquePropertiesParams
- type JobGetStuckParams
- type JobInsertFastParams
- type JobInsertFullParams
- type JobRescueManyParams
- type JobScheduleParams
- type JobSetCompleteIfRunningManyParams
- type JobSetStateIfRunningParams
- type JobState
- type JobUpdateParams
- type LeaderAttemptElectParams
- type LeaderAttemptReelectParams
- type LeaderInsertParams
- type LeaderResignParams
- type NullJobState
- type PGNotifyParams
- type Queries
- func (q *Queries) JobCancel(ctx context.Context, db DBTX, arg *JobCancelParams) (*RiverJob, error)
- func (q *Queries) JobCountByState(ctx context.Context, db DBTX, state JobState) (int64, error)
- func (q *Queries) JobDeleteBefore(ctx context.Context, db DBTX, arg *JobDeleteBeforeParams) (int64, error)
- func (q *Queries) JobGetAvailable(ctx context.Context, db DBTX, arg *JobGetAvailableParams) ([]*RiverJob, error)
- func (q *Queries) JobGetByID(ctx context.Context, db DBTX, id int64) (*RiverJob, error)
- func (q *Queries) JobGetByIDMany(ctx context.Context, db DBTX, id []int64) ([]*RiverJob, error)
- func (q *Queries) JobGetByKindAndUniqueProperties(ctx context.Context, db DBTX, arg *JobGetByKindAndUniquePropertiesParams) (*RiverJob, error)
- func (q *Queries) JobGetByKindMany(ctx context.Context, db DBTX, kind []string) ([]*RiverJob, error)
- func (q *Queries) JobGetStuck(ctx context.Context, db DBTX, arg *JobGetStuckParams) ([]*RiverJob, error)
- func (q *Queries) JobInsertFast(ctx context.Context, db DBTX, arg *JobInsertFastParams) (*RiverJob, error)
- func (q *Queries) JobInsertFull(ctx context.Context, db DBTX, arg *JobInsertFullParams) (*RiverJob, error)
- func (q *Queries) JobRescueMany(ctx context.Context, db DBTX, arg *JobRescueManyParams) error
- func (q *Queries) JobRetry(ctx context.Context, db DBTX, id int64) (*RiverJob, error)
- func (q *Queries) JobSchedule(ctx context.Context, db DBTX, arg *JobScheduleParams) (int64, error)
- func (q *Queries) JobSetCompleteIfRunningMany(ctx context.Context, db DBTX, arg *JobSetCompleteIfRunningManyParams) ([]*RiverJob, error)
- func (q *Queries) JobSetStateIfRunning(ctx context.Context, db DBTX, arg *JobSetStateIfRunningParams) (*RiverJob, error)
- func (q *Queries) JobUpdate(ctx context.Context, db DBTX, arg *JobUpdateParams) (*RiverJob, error)
- func (q *Queries) LeaderAttemptElect(ctx context.Context, db DBTX, arg *LeaderAttemptElectParams) (int64, error)
- func (q *Queries) LeaderAttemptReelect(ctx context.Context, db DBTX, arg *LeaderAttemptReelectParams) (int64, error)
- func (q *Queries) LeaderDeleteExpired(ctx context.Context, db DBTX, name string) (int64, error)
- func (q *Queries) LeaderGetElectedLeader(ctx context.Context, db DBTX, name string) (*RiverLeader, error)
- func (q *Queries) LeaderInsert(ctx context.Context, db DBTX, arg *LeaderInsertParams) (*RiverLeader, error)
- func (q *Queries) LeaderResign(ctx context.Context, db DBTX, arg *LeaderResignParams) (int64, error)
- func (q *Queries) PGAdvisoryXactLock(ctx context.Context, db DBTX, key int64) error
- func (q *Queries) PGNotify(ctx context.Context, db DBTX, arg *PGNotifyParams) error
- func (q *Queries) RiverMigrationDeleteByVersionMany(ctx context.Context, db DBTX, version []int64) ([]*RiverMigration, error)
- func (q *Queries) RiverMigrationGetAll(ctx context.Context, db DBTX) ([]*RiverMigration, error)
- func (q *Queries) RiverMigrationInsert(ctx context.Context, db DBTX, version int64) (*RiverMigration, error)
- func (q *Queries) RiverMigrationInsertMany(ctx context.Context, db DBTX, version []int64) ([]*RiverMigration, error)
- func (q *Queries) TableExists(ctx context.Context, db DBTX, tableName string) (bool, error)
- type RiverJob
- type RiverLeader
- type RiverMigration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttemptError ¶ added in v0.0.23
type JobCancelParams ¶ added in v0.0.23
type JobCancelParams struct {
ID int64
JobControlTopic string
CancelAttemptedAt json.RawMessage
}
type JobDeleteBeforeParams ¶ added in v0.0.23
type JobGetAvailableParams ¶ added in v0.0.23
type JobGetByKindAndUniquePropertiesParams ¶ added in v0.0.23
type JobGetStuckParams ¶ added in v0.0.23
type JobInsertFastParams ¶ added in v0.0.23
type JobInsertFullParams ¶ added in v0.0.23
type JobRescueManyParams ¶ added in v0.0.23
type JobScheduleParams ¶ added in v0.0.23
type JobSetCompleteIfRunningManyParams ¶ added in v0.1.0
type JobSetStateIfRunningParams ¶ added in v0.0.23
type JobState ¶ added in v0.0.23
type JobState string
const ( RiverJobStateAvailable JobState = "available" RiverJobStateCancelled JobState = "cancelled" RiverJobStateCompleted JobState = "completed" RiverJobStateDiscarded JobState = "discarded" RiverJobStateRetryable JobState = "retryable" RiverJobStateRunning JobState = "running" RiverJobStateScheduled JobState = "scheduled" )
type JobUpdateParams ¶ added in v0.0.23
type LeaderAttemptElectParams ¶ added in v0.0.23
type LeaderAttemptReelectParams ¶ added in v0.0.23
type LeaderInsertParams ¶ added in v0.0.23
type LeaderResignParams ¶ added in v0.0.23
type NullJobState ¶ added in v0.0.23
func (*NullJobState) Scan ¶ added in v0.0.23
func (ns *NullJobState) Scan(value interface{}) error
Scan implements the Scanner interface.
type PGNotifyParams ¶ added in v0.0.23
type Queries ¶
type Queries struct {
}
func (*Queries) JobCountByState ¶ added in v0.1.0
func (*Queries) JobDeleteBefore ¶ added in v0.0.23
func (*Queries) JobGetAvailable ¶ added in v0.0.23
func (*Queries) JobGetByID ¶ added in v0.0.23
func (*Queries) JobGetByIDMany ¶ added in v0.0.23
func (*Queries) JobGetByKindAndUniqueProperties ¶ added in v0.0.23
func (*Queries) JobGetByKindMany ¶ added in v0.0.23
func (*Queries) JobGetStuck ¶ added in v0.0.23
func (*Queries) JobInsertFast ¶ added in v0.0.23
func (*Queries) JobInsertFull ¶ added in v0.0.23
func (*Queries) JobRescueMany ¶ added in v0.0.23
Run by the rescuer to queue for retry or discard depending on job state.
func (*Queries) JobSchedule ¶ added in v0.0.23
func (*Queries) JobSetCompleteIfRunningMany ¶ added in v0.1.0
func (*Queries) JobSetStateIfRunning ¶ added in v0.0.23
func (*Queries) JobUpdate ¶ added in v0.0.23
A generalized update for any property on a job. This brings in a large number of parameters and therefore may be more suitable for testing than production.
func (*Queries) LeaderAttemptElect ¶ added in v0.0.23
func (*Queries) LeaderAttemptReelect ¶ added in v0.0.23
func (*Queries) LeaderDeleteExpired ¶ added in v0.0.23
func (*Queries) LeaderGetElectedLeader ¶ added in v0.0.23
func (*Queries) LeaderInsert ¶ added in v0.0.23
func (q *Queries) LeaderInsert(ctx context.Context, db DBTX, arg *LeaderInsertParams) (*RiverLeader, error)
func (*Queries) LeaderResign ¶ added in v0.0.23
func (*Queries) PGAdvisoryXactLock ¶ added in v0.0.23
func (*Queries) RiverMigrationDeleteByVersionMany ¶
func (*Queries) RiverMigrationGetAll ¶
func (*Queries) RiverMigrationInsert ¶
func (*Queries) RiverMigrationInsertMany ¶
type RiverJob ¶ added in v0.0.23
type RiverJob struct {
ID int64
Args []byte
Attempt int16
AttemptedAt *time.Time
AttemptedBy []string
CreatedAt time.Time
Errors []AttemptError
FinalizedAt *time.Time
Kind string
MaxAttempts int16
Metadata json.RawMessage
Priority int16
Queue string
State JobState
ScheduledAt time.Time
Tags []string
}
type RiverLeader ¶ added in v0.0.23
Click to show internal directories.
Click to hide internal directories.