filterbase

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package filterbase provides utility tools to implement filters.

Index

Constants

This section is empty.

Variables

View Source
var Config = struct {
	MaxLineLen int `yaml:"max_line_len"`
}{
	MaxLineLen: 1 * 1024 * 1024,
}
View Source
var (
	ErrMaxLineExceeded = errors.New("maximum line length is exceeded. this limit can be extended with config.filters._base_.max_line_len")
)

Functions

This section is empty.

Types

type Base

type Base struct {
	Reader *bufio.Reader
	// contains filtered or unexported fields
}

Base is base of filters. It provides common features for filter.

func (*Base) Close

func (b *Base) Close() error

Close closes head filter.

func (*Base) Init

func (b *Base) Init(r io.ReadCloser, readNext BaseReadNext)

Init initializes Base object.

func (*Base) Read

func (b *Base) Read(buf []byte) (int, error)

type BaseReadNext

type BaseReadNext func(buf *bytes.Buffer) error

BaseReadNext is callback to read next data hunk to buf

type LTSVReader

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

func NewLTSVReader

func NewLTSVReader(r io.Reader) *LTSVReader

func (*LTSVReader) Iter added in v1.16.3

func (r *LTSVReader) Iter() iter.Seq2[*ltsv.Set, error]

func (*LTSVReader) Read

func (r *LTSVReader) Read() (*ltsv.Set, error)

type LineReader

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

func NewLineReader

func NewLineReader(r io.Reader) *LineReader

func (*LineReader) ReadLine

func (r *LineReader) ReadLine() ([]byte, error)

Jump to

Keyboard shortcuts

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