Skip to content

Releases: satyrius/gonx

v1.4.0

05 Sep 18:36
78a4d7a
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.3.0...v1.4.0

Filters

19 Dec 05:47
Compare
Choose a tag to compare

Major features

  • Introduce Filter interface #19. It acts similar to Reducer, but it is about limiting chain entries.
    • Has Filter(*Entry) *Entry method to check is entry meets filter condition
    • Implements Reducer interface too, to be used in chains
  • Datetime filter #19. Its based on this PR #11 by @pshevtsov
  • Introduce StringParser #24 by @pshevtsov

Minor features

  • Run test for go version up to 1.5
  • Linting fixes #13, #14 (thanks to @pshevtsov)
  • More examples, espetially for reducers #17
  • Use goconvey for tests

Bugfixes

Hall of Glory

Special thanks to @pshevtsov for doing so much!

Parsing fix

05 Nov 14:00
Compare
Choose a tag to compare
  • Parsing last value without quotes was fixed, #9
  • Tested for Go v1.3

Bug fixes

20 Jul 23:31
Compare
Choose a tag to compare
  • Fix issue #6 which causes parser to crash if some value in a log line was empty
  • Fix TestGroupByReducer #4, it was random crashing, because we could not expect the order of entries readed from an output channel

Aggregation reducers

30 Mar 15:00
Compare
Choose a tag to compare

Whats new

  • The aggregation reducers such as Avg, Sum and Count was introduces along with Chain and GroupBy reducers.
  • Entry got some new mthods
    • Getters Field(name string), FloatField(name string)
    • Setters SetField(name string, value string), SetFloatField(name string, value float64), SetUintField(name string, uint64)
    • Utility methods Merge(entry *Entry), FieldsHash(fields []string), Partial(fields []string)

Backward incompatibilities

  • All functions deals with *Entry instead of Entry
  • MapReduce returns chan *Entry instead of chan interface{} and all reducers accept output channel as chan *Entry
  • Entry is a struct, not a map[string]string anymore and has two constructors NewEntry that accepts Fields and NewEmptyEntry
  • Entry.Get was renamed to Entry.Field

MapReduce

20 Nov 08:25
Compare
Choose a tag to compare

Implement function MapReduce to parse log file in asynchronous manner for speed improvement. Reader.Read and constructors signatures and behaviour still the same.

First stable release

11 Nov 11:43
Compare
Choose a tag to compare

Log reader type Reader with the following constructors

  • func NewReader(logFile io.Reader, format string) *Reader
  • func NewNginxReader(logFile io.Reader, nginxConf io.Reader, formatName string) (reader *Reader, err error)

And one interface method

  • func (r *Reader) Read() (record Entry, err error)