dedup

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(ctx context.Context, db *sql.DB) error

Types

type HashFunc

type HashFunc func([]byte) []byte

type NewOpts

type NewOpts struct {
	DB                *sql.DB
	Name              string
	MaxReceive        int
	Timeout           time.Duration
	DedupeEnabled     *bool
	BlockRepeatsOnDLQ *bool
	HashFunc          HashFunc
	Logger            logger.StandardLogger
}

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

func New

func New(opts NewOpts) (*Queue, error)

func (*Queue) Delete

func (q *Queue) Delete(ctx context.Context, id queue.ID) error

func (*Queue) Extend

func (q *Queue) Extend(ctx context.Context, id queue.ID, delay time.Duration) error

func (*Queue) MaxReceive

func (q *Queue) MaxReceive() int

func (*Queue) MoveToDeadLetter

func (q *Queue) MoveToDeadLetter(ctx context.Context, id queue.ID, jobName, failureReason, errorMsg string) error

func (*Queue) Receive

func (q *Queue) Receive(ctx context.Context) (*queue.Message, error)

func (*Queue) ReceiveAndWait

func (q *Queue) ReceiveAndWait(ctx context.Context, interval time.Duration) (*queue.Message, error)

func (*Queue) Send

func (q *Queue) Send(ctx context.Context, m queue.Message) error

func (*Queue) SendAndGetID

func (q *Queue) SendAndGetID(ctx context.Context, m queue.Message) (queue.ID, error)

func (*Queue) SendTx

func (q *Queue) SendTx(ctx context.Context, tx *sql.Tx, m queue.Message) error

func (*Queue) Timeout

func (q *Queue) Timeout() time.Duration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL