etlio

package
v0.0.20-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package etlio contains logic do handle io stuff.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsReader

func AsReader(it Iter) io.ReadCloser

AsReader returns an io.Reader that reads from the iterator

func ReadAll

func ReadAll(it Iter) ([]byte, error)

ReadAll reads all data from a []byte iterator

func ReadAllContext

func ReadAllContext(ctx context.Context, it Iter) ([]byte, error)

func WriteTo

func WriteTo(it Iter, w io.Writer) error

WriteTo writes the data from the given []byte iterator to the given writer.

Types

type Iter

type Iter = etl.Iter

Iter is an etl.Iter.

func FromReadCloser

func FromReadCloser(rd io.ReadCloser, opts ...ReaderOptFunc) Iter

FromReadCloser returns an iterator that reads from the io.ReadCloser Closing the iter will close the io.ReadCloser

func FromReader

func FromReader(rd io.Reader, opts ...ReaderOptFunc) Iter

FromReader returns an iterator that reads from the io.Reader

type ReaderOptFunc

type ReaderOptFunc func(*readerOptions)

func WithBufSize

func WithBufSize(size int) ReaderOptFunc

type YieldWriter

type YieldWriter etl.Y[[]byte]

func (YieldWriter) Write

func (yield YieldWriter) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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