queuex

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnMarshalTaskPayload

func UnMarshalTaskPayload[S storagex.Serial](s storagex.Serial, payload []byte, v any) error

Types

type ConsumerQueue

type ConsumerQueue interface {
	HandleFunc(key string, h Handler)
}

type Handler

type Handler func(ctx context.Context, task *Task)

type ProducerQueue

type ProducerQueue interface {
	Enqueue(task *Task, delay time.Duration) error
}

type Queue

type Queue interface {
	ProducerQueue
	ConsumerQueue

	Stop()
}

type Task

type Task struct {
	ID      string
	Key     string
	Payload []byte
}

func MarshalTask

func MarshalTask[S storagex.Serial](key string, s storagex.Serial, d any) *Task

Directories

Path Synopsis
impls
fs

Jump to

Keyboard shortcuts

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