tableutil

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromBuffer

func FromBuffer(cr flux.ColReader) flux.Table

FromBuffer constructs a flux.Table from a single flux.ColReader.

func Stream

func Stream(f func(ctx context.Context, fn SendFunc) error) (flux.Table, error)

Stream will call StreamWithContext with a background context.

func StreamWithContext

func StreamWithContext(ctx context.Context, f func(ctx context.Context, fn SendFunc) error) (flux.Table, error)

StreamWithContext will create a table that streams column readers through the flux.Table. This method will return only after the function buffers the first column reader. This first column reader is used to identify the group key and columns for the entire table stream.

Implementors using this *must* return at least one table. If the function returns without returning at least one table, then an error will be returned. If the first table that is returned is empty, then this will return an empty table and further buffers will not be used.

Types

type BufferedTable

type BufferedTable struct {
	GroupKey flux.GroupKey
	Columns  []flux.ColMeta
	Buffers  []flux.ColReader
	// contains filtered or unexported fields
}

BufferedTable represents a table of buffered column readers.

func (*BufferedTable) Cols

func (b *BufferedTable) Cols() []flux.ColMeta

func (*BufferedTable) Do

func (b *BufferedTable) Do(f func(flux.ColReader) error) error

func (*BufferedTable) Done

func (b *BufferedTable) Done()

func (*BufferedTable) Empty

func (b *BufferedTable) Empty() bool

func (*BufferedTable) Key

func (b *BufferedTable) Key() flux.GroupKey

type SendFunc

type SendFunc func(flux.ColReader)

SendFunc is used to send a flux.ColReader to a table stream so it can be read by the table consumer.

Jump to

Keyboard shortcuts

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