Documentation ¶
Index ¶
- func FromBuffer(cr flux.ColReader) flux.Table
- func Stream(key flux.GroupKey, cols []flux.ColMeta, ...) (flux.Table, error)
- func StreamWithContext(ctx context.Context, key flux.GroupKey, cols []flux.ColMeta, ...) (flux.Table, error)
- func Values(cr flux.ColReader, j int) array.Interface
- type BufferedTable
- type SendFunc
- type StreamWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromBuffer ¶
FromBuffer constructs a flux.Table from a single flux.ColReader.
func Stream ¶
func Stream(key flux.GroupKey, cols []flux.ColMeta, f func(ctx context.Context, w *StreamWriter) error) (flux.Table, error)
Stream will call StreamWithContext with a background context.
func StreamWithContext ¶
func StreamWithContext(ctx context.Context, key flux.GroupKey, cols []flux.ColMeta, f func(ctx context.Context, w *StreamWriter) 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) Done ¶
func (b *BufferedTable) Done()
func (*BufferedTable) Empty ¶
func (b *BufferedTable) Empty() bool
func (*BufferedTable) Key ¶
func (b *BufferedTable) Key() flux.GroupKey
type SendFunc ¶
SendFunc is used to send a flux.ColReader to a table stream so it can be read by the table consumer.
type StreamWriter ¶ added in v0.56.0
type StreamWriter struct {
// contains filtered or unexported fields
}
StreamWriter is the input end of a stream.
func (*StreamWriter) Cols ¶ added in v0.56.0
func (s *StreamWriter) Cols() []flux.ColMeta
func (*StreamWriter) Key ¶ added in v0.56.0
func (s *StreamWriter) Key() flux.GroupKey
func (*StreamWriter) UnsafeWrite ¶ added in v0.56.0
func (s *StreamWriter) UnsafeWrite(vs []array.Interface) error
UnsafeWrite will write the new buffer to the stream without validating that the resulting table is valid. This can be used to avoid the small performance hit that comes from validating the resulting table.
func (*StreamWriter) UnsafeWriteBuffer ¶ added in v0.56.0
func (s *StreamWriter) UnsafeWriteBuffer(cr flux.ColReader) error
UnsafeWriteBuffer will emit the given column reader to the stream. This does not validate that the column reader matches with the stream schema.