We need to move the local file operations outside of package ingest, and into package space:
Unexport AllZngFile and the other filenames in space.go
Unexport DataPath
Change the operations in pcap and log ingest so that the work to index or prepare the tmp files happens in package ingest, but that the final act of moving the new zng file or equivalent happens in side package space.
We will need new exported methods to be used by the ingest operations. For example:
func (s *Space) ReplaceAllData(newZngFile string) error {
// update any cached span info...
return os.Rename(newZngFile, s.dataPath(allZngFile))
}
These new operations will be points for concurrency protection, and eventually handle spaces not backed by local files.
We need to move the local file operations outside of package ingest, and into package space:
AllZngFile
and the other filenames in space.goDataPath
package ingest
, but that the final act of moving the new zng file or equivalent happens in sidepackage space
.