Currently beats only write state with the registry with the addition of the Keystore in #5687 we will have another way to write content to disk. We should refactor the writing to disk to a common abstraction that can be used in both context.
A few things that need to be supported:
- Write to a temporary file
- Replace an existing file
- If something go wrong abort and keep the original file in place.
- Fix any corner case on shutdown
Related code:
Currently beats only write state with the registry with the addition of the Keystore in #5687 we will have another way to write content to disk. We should refactor the writing to disk to a common abstraction that can be used in both context.
A few things that need to be supported:
Related code: