Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSVSink ¶
type CSVSink struct {
// contains filtered or unexported fields
}
CSVSink writes values to a file in CSV format.
func NewCSVSink ¶
NewCSVSink creates a sink that writes values to an io.Writer in CSV format.
func NewCSVSinkWithDelimiter ¶
NewCSVSinkWithDelimiter creates a sink that writes values to an io.Writer in CSV format, using a customized delimiter.
type ConcurrentSink ¶
type ConcurrentSink struct {
// contains filtered or unexported fields
}
ConcurrentSink inserts values to one of the downstream sinks. The insert will be blocked if all downstream sinks are working.
WARN: Although this sink can transform serial Writes to multiple down stream sinks, this sink itself is not concurrent safe. You must not call WriteRow and Flush concurrently.
func NewConcurrentSink ¶
func NewConcurrentSink(downStreamBuilder func(idx int) Sink, concurrency int) *ConcurrentSink
func (*ConcurrentSink) Close ¶
func (c *ConcurrentSink) Close(ctx context.Context) error
Close closes all downstream sinks concurrently, wait all sinks to be closed and returns the first error encountered.
WARN: Close() will wait until all existing write ops are finished.