package models
import "github.com/go-arrower/arrower/contexts/admin/internal/interfaces/repository/models"
Index ¶
- type ArrowerGueJob
- type ArrowerGueJobsHistory
- type ArrowerGueJobsSchedule
- type ArrowerGueJobsWorkerPool
- type DBTX
- type GetFinishedJobsByQueueAndTypeParams
- type JobHistoryPayloadSizeParams
- type JobTableSizeRow
- type LastHistoryPayloadsParams
- type PendingJobsParams
- type PendingJobsRow
- type PruneHistoryPayloadParams
- type Queries
- func New(db DBTX) *Queries
- func (q *Queries) DeleteJob(ctx context.Context, jobID string) error
- func (q *Queries) GetFinishedJobs(ctx context.Context) ([]ArrowerGueJobsHistory, error)
- func (q *Queries) GetFinishedJobsByQueue(ctx context.Context, queue string) ([]ArrowerGueJobsHistory, error)
- func (q *Queries) GetFinishedJobsByQueueAndType(ctx context.Context, arg GetFinishedJobsByQueueAndTypeParams) ([]ArrowerGueJobsHistory, error)
- func (q *Queries) GetJobHistory(ctx context.Context, jobID string) ([]ArrowerGueJobsHistory, error)
- func (q *Queries) GetPendingJobs(ctx context.Context, queue string) ([]ArrowerGueJob, error)
- func (q *Queries) GetQueues(ctx context.Context) ([]string, error)
- func (q *Queries) GetSchedules(ctx context.Context) ([]ArrowerGueJobsSchedule, error)
- func (q *Queries) GetWorkerPools(ctx context.Context) ([]ArrowerGueJobsWorkerPool, error)
- func (q *Queries) JobHistoryPayloadSize(ctx context.Context, arg JobHistoryPayloadSizeParams) (interface{}, error)
- func (q *Queries) JobHistorySize(ctx context.Context, createdAt pgtype.Timestamptz) (interface{}, error)
- func (q *Queries) JobTableSize(ctx context.Context) (JobTableSizeRow, error)
- func (q *Queries) JobTypes(ctx context.Context, queue string) ([]string, error)
- func (q *Queries) LastHistoryPayloads(ctx context.Context, arg LastHistoryPayloadsParams) ([][]byte, error)
- func (q *Queries) PendingJobs(ctx context.Context, arg PendingJobsParams) ([]PendingJobsRow, error)
- func (q *Queries) PruneHistory(ctx context.Context, createdAt pgtype.Timestamptz) error
- func (q *Queries) PruneHistoryPayload(ctx context.Context, arg PruneHistoryPayloadParams) error
- func (q *Queries) ScheduleJobs(ctx context.Context, arg []ScheduleJobsParams) (int64, error)
- func (q *Queries) StatsAvgDurationOfJobs(ctx context.Context, queue string) (float64, error)
- func (q *Queries) StatsFailedJobs(ctx context.Context, queue string) (int64, error)
- func (q *Queries) StatsPendingJobs(ctx context.Context, queue string) (int64, error)
- func (q *Queries) StatsPendingJobsPerType(ctx context.Context, queue string) ([]StatsPendingJobsPerTypeRow, error)
- func (q *Queries) StatsProcessedJobs(ctx context.Context, queue string) (int64, error)
- func (q *Queries) StatsQueueWorkerPoolSize(ctx context.Context, queue string) (int32, error)
- func (q *Queries) TotalFinishedJobs(ctx context.Context) (int64, error)
- func (q *Queries) TotalFinishedJobsByQueue(ctx context.Context, queue string) (int64, error)
- func (q *Queries) TotalFinishedJobsByQueueAndType(ctx context.Context, arg TotalFinishedJobsByQueueAndTypeParams) (int64, error)
- func (q *Queries) UpdateRunAt(ctx context.Context, arg UpdateRunAtParams) error
- func (q *Queries) UpsertWorkerToPool(ctx context.Context, arg UpsertWorkerToPoolParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type ScheduleJobsParams
- type StatsPendingJobsPerTypeRow
- type TotalFinishedJobsByQueueAndTypeParams
- type UpdateRunAtParams
- type UpsertWorkerToPoolParams
Types ¶
type ArrowerGueJob ¶
type ArrowerGueJob struct { JobID string Priority int16 RunAt pgtype.Timestamptz JobType string Args []byte ErrorCount int32 LastError string Queue string CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz }
type ArrowerGueJobsHistory ¶
type ArrowerGueJobsHistory struct { JobID string Priority int16 RunAt pgtype.Timestamptz JobType string Args []byte Queue string RunCount int32 RunError string CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz Success bool FinishedAt pgtype.Timestamptz PrunedAt pgtype.Timestamptz }
type ArrowerGueJobsSchedule ¶
type ArrowerGueJobsSchedule struct { Queue string Spec string JobType string Args []byte CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz }
type ArrowerGueJobsWorkerPool ¶
type ArrowerGueJobsWorkerPool struct { ID string Queue string Workers int16 GitHash string JobTypes []string CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz }
type DBTX ¶
type DBTX interface { Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) Query(context.Context, string, ...interface{}) (pgx.Rows, error) QueryRow(context.Context, string, ...interface{}) pgx.Row CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) }
type GetFinishedJobsByQueueAndTypeParams ¶
type JobHistoryPayloadSizeParams ¶
type JobHistoryPayloadSizeParams struct { Queue string CreatedAt pgtype.Timestamptz }
type JobTableSizeRow ¶
type LastHistoryPayloadsParams ¶
type PendingJobsParams ¶
type PendingJobsParams struct { DateBin pgtype.Interval FinishedAt pgtype.Timestamptz Limit int32 }
type PendingJobsRow ¶
type PendingJobsRow struct { T pgtype.Timestamptz Count int64 }
type PruneHistoryPayloadParams ¶
type PruneHistoryPayloadParams struct { Queue string CreatedAt pgtype.Timestamptz }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func New ¶
func (*Queries) DeleteJob ¶
func (*Queries) GetFinishedJobs ¶
func (q *Queries) GetFinishedJobs(ctx context.Context) ([]ArrowerGueJobsHistory, error)
func (*Queries) GetFinishedJobsByQueue ¶
func (q *Queries) GetFinishedJobsByQueue(ctx context.Context, queue string) ([]ArrowerGueJobsHistory, error)
func (*Queries) GetFinishedJobsByQueueAndType ¶
func (q *Queries) GetFinishedJobsByQueueAndType(ctx context.Context, arg GetFinishedJobsByQueueAndTypeParams) ([]ArrowerGueJobsHistory, error)
func (*Queries) GetJobHistory ¶
func (*Queries) GetPendingJobs ¶
func (*Queries) GetQueues ¶
func (*Queries) GetSchedules ¶
func (q *Queries) GetSchedules(ctx context.Context) ([]ArrowerGueJobsSchedule, error)
func (*Queries) GetWorkerPools ¶
func (q *Queries) GetWorkerPools(ctx context.Context) ([]ArrowerGueJobsWorkerPool, error)
func (*Queries) JobHistoryPayloadSize ¶
func (q *Queries) JobHistoryPayloadSize(ctx context.Context, arg JobHistoryPayloadSizeParams) (interface{}, error)
func (*Queries) JobHistorySize ¶
func (q *Queries) JobHistorySize(ctx context.Context, createdAt pgtype.Timestamptz) (interface{}, error)
func (*Queries) JobTableSize ¶
func (q *Queries) JobTableSize(ctx context.Context) (JobTableSizeRow, error)
func (*Queries) JobTypes ¶
func (*Queries) LastHistoryPayloads ¶
func (q *Queries) LastHistoryPayloads(ctx context.Context, arg LastHistoryPayloadsParams) ([][]byte, error)
func (*Queries) PendingJobs ¶
func (q *Queries) PendingJobs(ctx context.Context, arg PendingJobsParams) ([]PendingJobsRow, error)
func (*Queries) PruneHistory ¶
func (*Queries) PruneHistoryPayload ¶
func (q *Queries) PruneHistoryPayload(ctx context.Context, arg PruneHistoryPayloadParams) error
func (*Queries) ScheduleJobs ¶
func (*Queries) StatsAvgDurationOfJobs ¶
func (*Queries) StatsFailedJobs ¶
func (*Queries) StatsPendingJobs ¶
func (*Queries) StatsPendingJobsPerType ¶
func (q *Queries) StatsPendingJobsPerType(ctx context.Context, queue string) ([]StatsPendingJobsPerTypeRow, error)
func (*Queries) StatsProcessedJobs ¶
func (*Queries) StatsQueueWorkerPoolSize ¶
func (*Queries) TotalFinishedJobs ¶
func (*Queries) TotalFinishedJobsByQueue ¶
func (*Queries) TotalFinishedJobsByQueueAndType ¶
func (q *Queries) TotalFinishedJobsByQueueAndType(ctx context.Context, arg TotalFinishedJobsByQueueAndTypeParams) (int64, error)
func (*Queries) UpdateRunAt ¶
func (q *Queries) UpdateRunAt(ctx context.Context, arg UpdateRunAtParams) error
func (*Queries) UpsertWorkerToPool ¶
func (q *Queries) UpsertWorkerToPool(ctx context.Context, arg UpsertWorkerToPoolParams) error
func (*Queries) WithTx ¶
type ScheduleJobsParams ¶
type ScheduleJobsParams struct { JobID string CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz Queue string JobType string Priority int16 RunAt pgtype.Timestamptz Args []byte }
type StatsPendingJobsPerTypeRow ¶
type TotalFinishedJobsByQueueAndTypeParams ¶
type UpdateRunAtParams ¶
type UpdateRunAtParams struct { RunAt pgtype.Timestamptz JobID string }
type UpsertWorkerToPoolParams ¶
type UpsertWorkerToPoolParams struct { ID string Queue string Workers int16 UpdatedAt pgtype.Timestamptz }
Source Files ¶
copyfrom.go db.go models.go query.sql.go
- Version
- v0.0.0-20250311203644-ab26c1152cb4 (latest)
- Published
- Mar 11, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 18 minutes ago –
Tools for package owners.