litestream
litestream copied to clipboard
Programmatic Usage
I couldn't find an existing issue asking this - is there a way to consume this programmatically? On some app platforms, one can point to a code base and have it automatically built and deployed. In this case, you can't use litestream, but if you're writing a Go-based app then you could import it and do a restore on app startup, and run periodic backups in a goroutine.
As a workaround, one could build a docker image that had litestream in it, but it can be more attractive to use it in-process in the example above.
Apologies in advance if this is already addressed elsewhere.
And I just discovered https://github.com/benbjohnson/litestream/issues/215
I read through https://github.com/benbjohnson/litestream-library-example/blob/main/main.go and it's sort of complex - is there any interest in creating a friendlier API for this?