Overview
Currently, the Spooler is self-referential internally. The WriterFactory creates a new fileWriter, which is tracked by the currentWriter field in Spooler.
|
type Spooler struct { |
|
config SpoolerConfig |
|
writer writerFactory |
|
batcher *batcher |
|
currentWriter *fileWriter |
|
} |
Scope
Offload the tracking part to WriterFactory itself and rename it to more relevant one, probably Writer.
Overview
Currently, the
Spooleris self-referential internally. TheWriterFactorycreates a newfileWriter, which is tracked by thecurrentWriterfield inSpooler.synapse/spooler/spooler.go
Lines 63 to 68 in f171ddd
Scope
Offload the tracking part to
WriterFactoryitself and rename it to more relevant one, probablyWriter.