Skip to content

Aggregation reducers

Compare
Choose a tag to compare
@satyrius satyrius released this 30 Mar 15:00
· 125 commits to master since this release

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