Documentation
¶
Overview ¶
Package json implements a parser for json serialized records
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser implements a parser for json serialized records
func NewParser ¶
func NewParser(c *ParserConfig) (*Parser, error)
NewParser returns a new json parser
func (*Parser) Parse ¶
func (p *Parser) Parse(objects chan *replay.Object, entries chan *kinesis.PutRecordsRequestEntry)
Parse spawns a pool of workers that process the incoming stream of objects, performing parsing and filtering logic before publishing to the entries stream. Parse blocks until all objects have been parsed and emitted.
type ParserConfig ¶
type ParserConfig struct { Concurrency int `validate:"required,min=1"` Delimiter *regexp.Regexp `validate:"-"` Log logrus.FieldLogger `validate:"required"` PartitionKey string `validate:"required"` Replace *regexp.Regexp `validate:"-"` ReplaceWith string `validate:"-"` Schema string `validate:"-"` }
ParserConfig defines a json parser's configuration
func NewParserConfig ¶
func NewParserConfig() *ParserConfig
NewParserConfig returns a new config value with appropriate defaults
Click to show internal directories.
Click to hide internal directories.