reducer

package
v0.0.0-...-14d575d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStats

func NewStats() port.Reducer

Types

type Count

type Count struct {
	// contains filtered or unexported fields
}

func NewCount

func NewCount() *Count

func NewNone

func NewNone() *Count

func (*Count) Reduce

func (r *Count) Reduce(doc *model.Document)

func (*Count) Result

func (r *Count) Result() map[interface{}]interface{}

type None

type None struct {
	// contains filtered or unexported fields
}

func (*None) Reduce

func (r *None) Reduce(doc *model.Document)

func (*None) Result

func (r *None) Result() map[interface{}]interface{}

type Sum

type Sum struct {
	// contains filtered or unexported fields
}

func NewSum

func NewSum() *Sum

func (*Sum) Reduce

func (r *Sum) Reduce(doc *model.Document)

Reduce will sum up using int64 if integer values are used, and switch to float64 as soon as decimal values are used.

func (*Sum) Result

func (r *Sum) Result() map[interface{}]interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL