poll

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg LaunchConfig)

func SimplePoller

func SimplePoller(ctx context.Context, wg *sync.WaitGroup, queues []queue.Queue, proc process.Processor, trans transform.TransformationFunc)

Types

type Config

type Config struct {
	Type        string `koanf:"type"`
	Concurrency int    `koanf:"concurrency"`
}

type LaunchConfig

type LaunchConfig struct {
	Queues          []queue.Queue
	Poller          Poller
	Processor       process.Processor
	QueueCancelFunc context.CancelFunc
	TransformFunc   transform.TransformationFunc
	Concurrency     int
}

type Poller

type Poller func(ctx context.Context, wg *sync.WaitGroup, queues []queue.Queue, proc process.Processor, trans transform.TransformationFunc)

func New

func New(poller string) (Poller, error)

Jump to

Keyboard shortcuts

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