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

Struct CompressedInput

input/inpututils/compressedstream.go:55–70  ·  view source on GitHub ↗

CompressedInput is a base for creating input components that processes multiple gzip or zstd-compressed logs coming from arbitrary sources. This class implements an internal queue of files (expressed by filenames) and instantiates a number of workers to process them. Subclasses can enqueue a file f

Source from the content-addressed store, hash-verified

53// a file given its filename and returns a io.ReadCloser instance for
54// that file.
55type CompressedInput struct {
56 // atomically-accessed, keep on top for 64-bit alignment.
57 stopping int64
58 numProcessedLines int64
59
60 Opener func(fn string) (io.ReadCloser, int64, time.Time, *url.URL, error)
61 Sizer func(fn string) (int64, error)
62 Done chan bool
63
64 files chan string
65 pool sync.Pool
66 data chan<- *baker.Data
67 stopNow chan struct{}
68
69 stats *inputStats
70}
71
72type inputStats struct {
73 // atomically-accessed, keep on top for 64-bit alignment.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected