worker

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RetryPolicy

type RetryPolicy string
const RETRY_POLICY_BACKOFF RetryPolicy = "BACKOFF"
const RETRY_POLICY_FIXED RetryPolicy = "FIXED"

type WorkerConfiguration

type WorkerConfiguration struct {
	ServerUrl string
}

type WorkerConfigurer

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

func NewWorkerConfigurer

func NewWorkerConfigurer(conf WorkerConfiguration, wg *sync.WaitGroup) *WorkerConfigurer

func (*WorkerConfigurer) RegisterWorker

func (wc *WorkerConfigurer) RegisterWorker(w *WorkerWrapper, name string, pollInterval time.Duration, batchSize int, numWorkers int) error

func (*WorkerConfigurer) Start

func (wc *WorkerConfigurer) Start()

func (*WorkerConfigurer) Stop

func (wc *WorkerConfigurer) Stop()

type WorkerWrapper

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

func NewDefaultWorker

func NewDefaultWorker(w func(map[string]any) (map[string]any, error)) *WorkerWrapper

func (*WorkerWrapper) WithRetryCount

func (w *WorkerWrapper) WithRetryCount(count int) *WorkerWrapper

func (*WorkerWrapper) WithRetryInterval

func (w *WorkerWrapper) WithRetryInterval(retryInterval int) *WorkerWrapper

func (*WorkerWrapper) WithRetryPolicy

func (w *WorkerWrapper) WithRetryPolicy(policy string) *WorkerWrapper

func (*WorkerWrapper) WithTimeoutSeconds

func (w *WorkerWrapper) WithTimeoutSeconds(timeout int) *WorkerWrapper

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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