table

package
v0.107.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy added in v0.103.0

func Copy(t flux.Table) (flux.BufferedTable, error)

Copy returns a buffered copy of the table and consumes the input table. If the input table is already buffered, it "consumes" the input and returns the same table.

The buffered table can then be copied additional times using the BufferedTable.Copy method.

This method should be used sparingly if at all. It will retain each of the buffers of data coming out of a table so the entire table is materialized in memory. For large datasets, this could potentially cause a problem. The allocator is meant to catch when this happens and prevent it.

func Diff

func Diff(want, got flux.TableIterator, opts ...DiffOption) string

Diff will perform a diff between two table iterators. This will sort the tables within the table iterators and produce a diff of the full output.

func Sort

func Sort(tables flux.TableIterator) (flux.TableIterator, error)

Sort will read a TableIterator and produce another TableIterator where the keys are sorted.

This method will buffer all of the data since it needs to ensure all of the tables are read to avoid any deadlocks. Be careful using this method in performance sensitive areas.

func Stringify

func Stringify(table flux.Table) string

Stringify will read a table and turn it into a human-readable string.

Types

type DiffOption

type DiffOption interface {
	// contains filtered or unexported methods
}

func DiffContext

func DiffContext(n int) DiffOption

type Iterator

type Iterator []flux.Table

func (Iterator) Do

func (t Iterator) Do(f func(flux.Table) error) error

type ProfilerResult added in v0.82.0

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

func NewProfilerResult added in v0.82.0

func NewProfilerResult(tables ...flux.Table) ProfilerResult

func (*ProfilerResult) Name added in v0.82.0

func (r *ProfilerResult) Name() string

func (*ProfilerResult) Tables added in v0.82.0

func (r *ProfilerResult) Tables() flux.TableIterator

Directories

Path Synopsis
Package static provides utilities for easily constructing static tables that are meant for tests.
Package static provides utilities for easily constructing static tables that are meant for tests.

Jump to

Keyboard shortcuts

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