internal

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemJobQueue

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

MemJobQueue implements engine.AsyncJobQueue with an in-memory channel. Suitable for single-process (local) usage.

func NewMemJobQueue

func NewMemJobQueue(bufferSize int) *MemJobQueue

func (*MemJobQueue) Ack

func (q *MemJobQueue) Ack(_ context.Context, id string) error

func (*MemJobQueue) Consume

func (q *MemJobQueue) Consume(ctx context.Context, group string, consumer string) (*engine.AsyncJob, string, error)

func (*MemJobQueue) Publish

func (q *MemJobQueue) Publish(_ context.Context, job engine.AsyncJob) error

type MemoryLock

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

MemoryLock implements lock.DistributedLock with an in-memory mutex. Suitable for single-process (local) usage where Redis is not available. Only one goroutine can hold the lock at a time.

func NewMemoryLock

func NewMemoryLock() *MemoryLock

func (*MemoryLock) Lock

func (l *MemoryLock) Lock(_ context.Context, _ string, _ time.Duration) (bool, func(), error)

type MemoryQueue

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

MemoryQueue implements repository.TaskQueue with an in-memory channel. Suitable for single-process (local) usage where Redis is not available.

func NewMemoryQueue

func NewMemoryQueue(bufferSize int) *MemoryQueue

NewMemoryQueue creates a queue with the given buffer size.

func (*MemoryQueue) Ack

func (q *MemoryQueue) Ack(_ context.Context, taskID int64) error

func (*MemoryQueue) MoveToDead

func (q *MemoryQueue) MoveToDead(_ context.Context, taskID int64) error

func (*MemoryQueue) PopAndReserve

func (q *MemoryQueue) PopAndReserve(ctx context.Context) (int64, error)

func (*MemoryQueue) Push

func (q *MemoryQueue) Push(_ context.Context, taskID int64) error

Jump to

Keyboard shortcuts

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