common

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BACKWARDS_MODE = "backwards"
	FORWARDS_MODE  = "forwards"
)

Variables

This section is empty.

Functions

func PrefixedProcessBackwardsQueue added in v0.0.5

func PrefixedProcessBackwardsQueue(processorName, prefix string) string

PrefixedProcessBackwardsQueue returns the backwards process queue name with prefix.

func PrefixedProcessForwardsQueue added in v0.0.5

func PrefixedProcessForwardsQueue(processorName, prefix string) string

PrefixedProcessForwardsQueue returns the forwards process queue name with prefix.

func PrefixedVerifyBackwardsQueue added in v0.0.5

func PrefixedVerifyBackwardsQueue(processorName, prefix string) string

PrefixedVerifyBackwardsQueue returns the backwards verify queue name with prefix.

func PrefixedVerifyForwardsQueue added in v0.0.5

func PrefixedVerifyForwardsQueue(processorName, prefix string) string

PrefixedVerifyForwardsQueue returns the forwards verify queue name with prefix.

func ProcessBackwardsQueue

func ProcessBackwardsQueue(processorName string) string

ProcessBackwardsQueue returns the backwards process queue name for a processor.

func ProcessForwardsQueue

func ProcessForwardsQueue(processorName string) string

ProcessForwardsQueue returns the forwards process queue name for a processor.

func ProcessQueue

func ProcessQueue(processorName string) string

ProcessQueue returns the process queue name for a processor (deprecated - use mode-specific queues).

func VerifyBackwardsQueue

func VerifyBackwardsQueue(processorName string) string

VerifyBackwardsQueue returns the backwards verify queue name for a processor.

func VerifyForwardsQueue

func VerifyForwardsQueue(processorName string) string

VerifyForwardsQueue returns the forwards verify queue name for a processor.

func VerifyQueue

func VerifyQueue(processorName string) string

VerifyQueue returns the verify queue name for a processor (deprecated - use mode-specific queues).

Types

type BlockProcessor

type BlockProcessor interface {
	Processor
	ProcessNextBlock(ctx context.Context) error

	// Queue management
	GetQueues() []QueueInfo
	GetHandlers() map[string]asynq.HandlerFunc

	// Task enqueueing (for internal use)
	EnqueueTask(ctx context.Context, task *asynq.Task, opts ...asynq.Option) error

	// Processing mode configuration
	SetProcessingMode(mode string)
}

BlockProcessor handles block discovery and processing.

type Processor

type Processor interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	Name() string
}

Processor defines the main interface for block processors.

type QueueInfo

type QueueInfo struct {
	Name     string
	Priority int
}

QueueInfo contains information about a processor queue.

Jump to

Keyboard shortcuts

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