publishers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package publishers provides implementations of various publisher strategies

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDropToStdoutPublisher

func NewDropToStdoutPublisher() worker.Publisher

NewDropToStdoutPublisher creates a new publisher instance that writes hits to stdout

func NewPingingPublisher

func NewPingingPublisher(
	ctx context.Context,
	publisher worker.Publisher,
	interval time.Duration,
	taskFunc func() (*worker.Task, error),
) worker.Publisher

NewPingingPublisher creates a new publisher that pings the given task at the given interval

func NewRetryingWithFallbackPublisher

func NewRetryingWithFallbackPublisher(
	primary, fallback worker.Publisher,
	maxRetries uint,
	retryDelay time.Duration,
) worker.Publisher

NewRetryingWithFallbackPublisher creates a new storage instance with retry and fallback capabilities

Types

type RetryingWithFallbackStorage

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

RetryingWithFallbackStorage implements Storage interface with retry logic and fallback

func (*RetryingWithFallbackStorage) Publish

Publish attempts to publish a task to the primary storage with retries. If all retries fail, it falls back to the fallback storage.

Jump to

Keyboard shortcuts

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