Documentation
¶
Overview ¶
Package csv provides the implementations of fit listener's interfaces that can listen to the events emitted by the decoder. The received events then will be converted and written as csv as they arrive.
This package can be helpful for debuging the library to ensure that the data is being decoded correctly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conv ¶
type Conv struct {
// contains filtered or unexported fields
}
Conv is an implementation for listeners that receive message events and convert them into CSV records.
func NewConverter ¶
NewConverter is a shorthand for NewConvWithOptions(w, defaultHeaderSize, defaultChannelBufferSize).
func NewConverterWithOptions ¶
NewConverterWithOptions creates a new csv converter *Conv with customizable header and buffer sizes. The header size is estimated since we write it as events arrive, and precision isn't required. The channel buffer size is used to pool incoming events, as we can't predict the event rate or processing speed, ensuring the broadcaster is not blocked.
The caller must call CloseAndWait() after the broadcasting of events is complete to ensure all buffered events are processed.
func (*Conv) OnMesgDef ¶
func (c *Conv) OnMesgDef(mesgDef proto.MessageDefinition)
OnMesgDef receive message definition from broadcaster