repeater

package
v0.0.140 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package repeater provides functions allows you to call an external function repeatedly with a limit on the result or number of attempts

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker func(wr WorkerResult) (bool, error)

Проверка условия завершения

type Config

type Config struct {
	LimitCount int64
	Timeout    time.Duration
	// contains filtered or unexported fields
}

type Worker

type Worker func(data interface{}) WorkerResult

Выполняемая функция

func (Worker) Run

func (worker Worker) Run(inData interface{}, checker Checker, config Config) (interface{}, error)

type WorkerResult

type WorkerResult struct {
	OutData interface{}
	Err     error
}

Jump to

Keyboard shortcuts

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