Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programmatic Usage #440

Open
alapidas opened this issue Oct 27, 2022 · 2 comments
Open

Programmatic Usage #440

alapidas opened this issue Oct 27, 2022 · 2 comments

Comments

@alapidas
Copy link

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.

@alapidas
Copy link
Author

And I just discovered #215

@alapidas
Copy link
Author

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?

@alapidas alapidas reopened this Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant