asyncprocessor

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package asyncprocessor contains an asynchronous processor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

type Processor struct {
	BufferSize int
	OnError    func(context.Context, error)
	// contains filtered or unexported fields
}

Processor is an asynchronous queue processor that allows to detach the routine that is reading a stream from the routine that is writing a stream.

func (*Processor) Close

func (w *Processor) Close()

Close closes the processor.

func (*Processor) Initialize

func (w *Processor) Initialize()

Initialize initializes the processor.

func (*Processor) Push

func (w *Processor) Push(cb func() error) bool

Push pushes data to the queue.

func (*Processor) Start

func (w *Processor) Start()

Start starts the processor.

Jump to

Keyboard shortcuts

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