chunker

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunks

type Chunks struct {
	Cfg Config
	// contains filtered or unexported fields
}

func NewChunks

func NewChunks(cfg Config) *Chunks

func (*Chunks) Chunk

func (c *Chunks) Chunk() chan any

func (*Chunks) Chunks

func (c *Chunks) Chunks() <-chan chan any

func (*Chunks) Generator

func (c *Chunks) Generator()

func (*Chunks) NewChunk

func (c *Chunks) NewChunk() chan any

func (*Chunks) SetValue

func (c *Chunks) SetValue(v any)

func (*Chunks) Stop

func (c *Chunks) Stop()

type Config

type Config struct {
	MaxChunkSize uint
	BufferSize   uint
	MaxIdleTime  time.Duration
	Strategy     Strategy
}

type Strategy added in v1.3.4

type Strategy string
const (
	FlushByOneMessage Strategy = "flush-by-one-message"
	FlushByTime       Strategy = "flush-by-time"
)

Jump to

Keyboard shortcuts

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