MCPcopy Create free account
hub / github.com/AdRoll/baker / Filter

Interface Filter

api.go:86–100  ·  view source on GitHub ↗

Filter represents a data filter; a filter is a function that processes records. A filter can discard, transform, forward and even create records.

Source from the content-addressed store, hash-verified

84// Filter represents a data filter; a filter is a function that processes
85// records. A filter can discard, transform, forward and even create records.
86type Filter interface {
87 // Process processes a single Record, and then optionally sends it to
88 // next filter in the chain.
89 // Process might mutate the Record, adding/modifying/removing fields,
90 // and might decide to throw it away, or pass it to next filter in chain
91 // by calling the next() function. In some cases, a filter might generate
92 // multiple Record in output, by calling next() multiple times.
93 // next() is guaranteed to be non-nil; for the last filter of the chain,
94 // it points to a function that wraps up the filtering chain and sends
95 // the Record to the output.
96 Process(l Record, next func(Record))
97
98 // Stats returns stats about the filter
99 Stats() FilterStats
100}
101
102// Output is the final end of a topology, it process the records that have
103// reached the end of the filter chain and performs the final action (storing,

Callers 3

NewTopologyFromConfigFunction · 0.65
testExternalMatchFilesFunction · 0.65

Implementers 15

LazyFilterexamples/filtering/filter.go
ExternalMatchfilter/external_match.go
Concatenatefilter/concatenate.go
ReplaceFieldsfilter/replace_fields.go
Timestampfilter/timestamp.go
SetStringFromURLfilter/set_string_from_url.go
ExpandJSONfilter/expand_json.go
Hashfilter/hash.go
Cryptfilter/crypt.go
URLParamfilter/url_param.go
ExpandListfilter/expand_list.go
ClearFieldsfilter/clear_fields.go

Calls

no outgoing calls

Tested by

no test coverage detected