gobatch

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 3 Imported by: 2

README

gobatch

Go batch job

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batcher

type Batcher struct {
	BatchSize uint
	MaxWait   time.Duration
	Job       Job
	MaxRetry  uint
	// contains filtered or unexported fields
}

Batcher struct for batcher job.

func NewBatcher

func NewBatcher(job Job) *Batcher

func (*Batcher) Start

func (b *Batcher) Start(ctx context.Context) (chan interface{}, error)

Start start batch

type Job

type Job func(ctx context.Context, queue []interface{}) error

Jump to

Keyboard shortcuts

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