loop

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerFunc

type HandlerFunc[T any] func(context.Context, T) error

type Loop

type Loop[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](opts Options[T]) *Loop[T]

func (*Loop[T]) Enqueue

func (l *Loop[T]) Enqueue(req T)

func (*Loop[T]) Run

func (l *Loop[T]) Run(ctx context.Context) error

type Options

type Options[T any] struct {
	Handler    HandlerFunc[T]
	BufferSize *uint64
}

Jump to

Keyboard shortcuts

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