Documentation
¶
Overview ¶
Package postgres provides a PostgreSQL-backed implementation of the build queue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresQueue ¶
type PostgresQueue struct {
// contains filtered or unexported fields
}
PostgresQueue implements queue.Queue using PostgreSQL.
func NewPostgresQueue ¶
func NewPostgresQueue(db *sql.DB, logger *slog.Logger) *PostgresQueue
NewPostgresQueue creates a new PostgreSQL-backed queue.
func (*PostgresQueue) Ack ¶
func (q *PostgresQueue) Ack(ctx context.Context, jobID string) error
Ack acknowledges successful processing of a job, removing it from the queue.
func (*PostgresQueue) Dequeue ¶
Dequeue retrieves and locks the next available build job from the queue. Uses SELECT FOR UPDATE SKIP LOCKED for concurrent worker safety.
Click to show internal directories.
Click to hide internal directories.