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

Interface Input

api.go:58–82  ·  view source on GitHub ↗

Input is an interface representing an object that produces (fetches) datas for the filter.

Source from the content-addressed store, hash-verified

56// Input is an interface representing an object that produces
57// (fetches) datas for the filter.
58type Input interface {
59 // Start fetching data and pushing it into the channel.
60 // If this call blocks forever, the topology is permanent and
61 // acts like a long-running daemon; if this calls exits after
62 // it has finished, the topology is meant to be run as a task
63 // to process a fixed-size input, and baker will cleanly shutdown
64 // after all inputs have been fully processed.
65 Run(output chan<- *Data) error
66
67 // Force the input to stop as clean as possible, at a good boundary.
68 // This is usually issued at the user's request of exiting the process.
69 // For instance, it might make sense to finish processing the current
70 // batch of data or the current file, and then save in stable storage
71 // the checkpoint to resume it later.
72 Stop()
73
74 // Return stats about the input
75 Stats() InputStats
76
77 // This function is called when the filter is finished with
78 // the memory received through the input channel. Since the
79 // memory was allocated by Input, it is returned to it
80 // so that it might be recycled.
81 FreeMem(data *Data)
82}
83
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.

Callers 23

Test_assignFieldMappingFunction · 0.65
TestExampleHelpFunction · 0.65
TestE2EFullTopologyFunction · 0.65
TestMergeHistogramFunction · 0.65
TestMergeTimingsFunction · 0.65
TestRequiredFieldsFunction · 0.65
RunMethod · 0.65
StopMethod · 0.65
newWorkerFunction · 0.65
BenchmarkFilesOutputFunction · 0.65

Implementers 10

dummyInputtopology_test.go
SQSinput/sqs.go
Kinesisinput/kinesis.go
KCLinput/kcl.go
TCPinput/tcp.go
Listinput/list.go
Recordsinput/inputtest/records.go
Baseinput/inputtest/base.go
Randominput/inputtest/random.go
LogLineinput/inputtest/logline.go

Calls

no outgoing calls

Tested by

no test coverage detected