sink

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWriter

func NewWriter(sink tdl.Sink) io.Writer

func Readers

func Readers(sink Reader) (readers map[string]io.Reader, err error)

Readers creates a map of unit to io.Reader

func WriteTo

func WriteTo(writer io.Writer) tdl.Sink

Types

type Buffered

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

func (*Buffered) Reader

func (p *Buffered) Reader(unit string) (io.Reader, error)

Reader implements tdl.Pipe.

func (*Buffered) Units

func (p *Buffered) Units() iter.Seq[string]

Units implements tdl.Pipe.

func (*Buffered) WriteUnit

func (p *Buffered) WriteUnit(unit string, reader io.Reader) error

WriteUnit implements tdl.Pipe.

type Fs

type Fs interface {
	Reader
	tdl.Sink
}

func NewFs

func NewFs(fsys afero.Fs, path string) Fs

type Memory

type Memory interface {
	Reader
	tdl.Sink
}

func NewPipe

func NewPipe() Memory

type Porcelain

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

func (*Porcelain) Reader

func (p *Porcelain) Reader(unit string) (io.Reader, error)

Reader implements tdl.Pipe.

func (*Porcelain) Units

func (p *Porcelain) Units() iter.Seq[string]

Units implements tdl.Pipe.

func (*Porcelain) WriteUnit

func (p *Porcelain) WriteUnit(unit string, reader io.Reader) error

WriteUnit implements tdl.Pipe.

type Reader

type Reader interface {
	Units() iter.Seq[string]
	Reader(string) (io.Reader, error)
}

Jump to

Keyboard shortcuts

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