Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectorFunc ¶
type CollectorFunc func(interface{}) error
CollectorFunc is a function used to colllect incoming stream data. It can be used as a stream sink.
type CsvCollector ¶
type CsvCollector struct {
// contains filtered or unexported fields
}
CsvCollector represents a node that can collect items streamed as type []string and write them as comma-separated values to the specified io.Writer or file.
func (*CsvCollector) DelimChar ¶
func (c *CsvCollector) DelimChar(char rune) *CsvCollector
func (*CsvCollector) Headers ¶
func (c *CsvCollector) Headers(headers []string) *CsvCollector
func (*CsvCollector) Open ¶
func (c *CsvCollector) Open(ctx context.Context) <-chan error
Open is the starting point that opens the sink for data to start flowing
func (*CsvCollector) SetInput ¶
func (c *CsvCollector) SetInput(in <-chan interface{})
SetInput sets the channel input
type FuncCollector ¶
type FuncCollector struct {
// contains filtered or unexported fields
}
FuncCollector is a colletor that uses a function to collect data. The specified function must be of type:
CollectorFunc
func Func ¶
func Func(f CollectorFunc) *FuncCollector
Func creates a new value *FuncCollector that will use the specified function parameter to collect streaming data.
func (*FuncCollector) Open ¶
func (c *FuncCollector) Open(ctx context.Context) <-chan error
Open is the starting point that starts the collector
func (*FuncCollector) SetInput ¶
func (c *FuncCollector) SetInput(in <-chan interface{})
SetInput sets the channel input
type NullCollector ¶
type NullCollector struct {
// contains filtered or unexported fields
}
func Null ¶
func Null() *NullCollector
func (*NullCollector) Open ¶
func (s *NullCollector) Open(ctx context.Context) <-chan error
Open opens the node to start collecting
func (*NullCollector) SetInput ¶
func (s *NullCollector) SetInput(in <-chan interface{})
type SliceCollector ¶
type SliceCollector struct {
// contains filtered or unexported fields
}
func Slice ¶
func Slice() *SliceCollector
func (*SliceCollector) Get ¶
func (s *SliceCollector) Get() []interface{}
func (*SliceCollector) SetInput ¶
func (s *SliceCollector) SetInput(in <-chan interface{})
type WriterCollector ¶
type WriterCollector struct {
// contains filtered or unexported fields
}
func Writer ¶
func Writer(writer io.Writer) *WriterCollector
func (*WriterCollector) SetInput ¶
func (c *WriterCollector) SetInput(in <-chan interface{})