Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResultDecoder ¶
type ResultDecoder struct {
// contains filtered or unexported fields
}
ResultDecoder decodes raw input strings from a reader into a flux.Result. It uses a separator to split the input into tokens and generate table rows. Tokens are kept as they are and put into a table with schema `_time`, `_value`. The `_value` column contains tokens. The `_time` column contains the timestamps for when each `_value` has been read. Strings in `_value` are obtained from the io.Reader passed to the Decode function. ResultDecoder outputs one table once the reader reaches EOF.
func NewResultDecoder ¶
func NewResultDecoder(config *ResultDecoderConfig) *ResultDecoder
NewResultDecoder creates a new result decoder from config.
func (*ResultDecoder) Name ¶
func (*ResultDecoder) Name() string
func (*ResultDecoder) Tables ¶
func (rd *ResultDecoder) Tables() flux.TableIterator
type ResultDecoderConfig ¶
type ResultDecoderConfig struct { Separator byte TimeProvider TimeProvider }
ResultDecoderConfig is the configuration for a result decoder.
type TimeProvider ¶
TimeProvider gives the current time.