scanner

package
v4.27.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AckFn

type AckFn func(context.Context, error) error

AckFn is a function provided to a scanner that it should call once the derived io.ReadCloser is fully consumed.

type Config

type Config struct {
	Type   string
	Plugin any
}

func FromAny

func FromAny(prov docs.Provider, value any) (conf Config, err error)

type Creator

type Creator interface {
	Create(rdr io.ReadCloser, aFn AckFn, details SourceDetails) (Scanner, error)
	Close(context.Context) error
}

Creator is an interface implemented by all scanners, which allows components to construct a scanner from an unbounded io.ReadCloser.

type Scanner

type Scanner interface {
	Next(context.Context) (message.Batch, AckFn, error)
	Close(context.Context) error
}

Scanner is an interface implemented by all scanner implementations once a creator has instantiated it on a byte stream.

type SourceDetails

type SourceDetails struct {
	Name string
}

SourceDetails contains exclusively optional information which could be used by codec implementations in order to determine the underlying data format.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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