runner

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchExecutor

type BatchExecutor[I any, O any] interface {
	Execute(input I) (O, error)
}

func NewBatchExecutor

func NewBatchExecutor[I any, O any](executor ExecuteFunc[I, Output[O]], capacity int, timeout time.Duration) BatchExecutor[I, O]

func NewSerialExecutor

func NewSerialExecutor[I any, O any](executor ExecuteFunc[I, Output[O]]) BatchExecutor[I, O]

type BatchRunner

type BatchRunner[V any] interface {
	Run(v V) error
}

func NewBatchRunner

func NewBatchRunner[V any](runner func([]V) []error, capacity int, timeout time.Duration) BatchRunner[V]

func NewSerialRunner

func NewSerialRunner[V any](runner ExecuteFunc[V, error]) BatchRunner[V]

type ExecuteFunc

type ExecuteFunc[I any, O any] func([]I) []O

type Output

type Output[O any] struct {
	Val O
	Err error
}

Jump to

Keyboard shortcuts

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