leasequeue

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package leasequeue is the legacy facade for the canonical queue adapter.

Deprecated: use github.com/faustbrian/go-lease/adapters/queue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TokenFromContext deprecated

func TokenFromContext(ctx context.Context) (lease.Token, bool)

TokenFromContext returns the fencing token installed by the queue adapter.

Deprecated: use queue.TokenFromContext.

Types

type KeyFunc deprecated

type KeyFunc func(core.TaskMessage) (lease.Key, error)

KeyFunc derives a bounded lease key from a delivered queue message.

Deprecated: use queue.KeyFunc.

type Worker deprecated

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

Worker preserves the released queue worker type while delegating behavior to the canonical adapter.

Deprecated: use queue.Worker.

func NewWorker deprecated

func NewWorker(
	inner core.Worker,
	client *lease.Client,
	policy lease.Policy,
	key KeyFunc,
) (*Worker, error)

NewWorker delegates to the canonical queue adapter.

Deprecated: use queue.NewWorker.

func (*Worker) Queue

func (worker *Worker) Queue(task core.TaskMessage) error

Queue delegates to the caller-owned worker.

func (*Worker) Request

func (worker *Worker) Request() (core.TaskMessage, error)

Request delegates to the caller-owned worker.

func (*Worker) Run

func (worker *Worker) Run(ctx context.Context, task core.TaskMessage) error

Run delegates to the canonical queue adapter.

func (*Worker) Shutdown

func (worker *Worker) Shutdown() error

Shutdown delegates to the caller-owned worker.

Jump to

Keyboard shortcuts

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