exportcallback

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Overview

Package exportcallback provides callback-based row sources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncIterator

type FuncIterator struct {
	NextFunc  IteratorFunc
	CloseFunc func() error
}

FuncIterator wraps a function into a RowIterator.

func (*FuncIterator) Close

func (it *FuncIterator) Close() error

func (*FuncIterator) Next

func (it *FuncIterator) Next(ctx context.Context) (export.Row, error)

type IteratorFunc

type IteratorFunc func(ctx context.Context) (export.Row, error)

IteratorFunc yields a row or io.EOF.

type Source

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

Source wraps a callback function as a RowSource.

func NewSource

func NewSource(fn SourceFunc) *Source

NewSource creates a callback-based RowSource.

func (*Source) Open

Open delegates to the configured callback.

type SourceFunc

type SourceFunc func(ctx context.Context, spec export.RowSourceSpec) (export.RowIterator, error)

SourceFunc builds a RowIterator for a request.

Jump to

Keyboard shortcuts

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