wpool

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Caller string
	Fn     RunFunc
	// contains filtered or unexported fields
}

type Options

type Options struct {
	NumWorkers   int
	SendDuration time.Duration
}

type Pool

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

func New

func New(options Options) *Pool

func (*Pool) Run

func (p *Pool) Run(ctx context.Context)

func (*Pool) Sched

func (p *Pool) Sched(ctx context.Context, e Event, period time.Duration)

func (*Pool) Send

func (p *Pool) Send(ctx context.Context, e Event)

func (*Pool) Stop

func (p *Pool) Stop()

type RunFunc

type RunFunc func(ctx context.Context) error

Jump to

Keyboard shortcuts

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