itemgenerator

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

func NewGenerator

func NewGenerator[T any](name string, min, max int, delay time.Duration, generateFunc func() (*T, error)) (*Generator[T], error)

func (*Generator[T]) Close

func (g *Generator[T]) Close()

func (*Generator[T]) GetItem

func (g *Generator[T]) GetItem(ctx context.Context) (*T, error)

func (*Generator[T]) Run

func (g *Generator[T]) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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