component: Add 'Snapshottable' component

This commit is contained in:
Tom Wiesing 2022-10-01 20:11:01 +02:00
parent 1dac09bc03
commit b6c36b5488
No known key found for this signature in database
7 changed files with 28 additions and 13 deletions

View file

@ -124,8 +124,8 @@ func (ts Triplestore) PurgeRepo(repo string) error {
var errTSBackupWrongStatusCode = errors.New("Distillery.Backup: Wrong status code")
// Snapshot snapshots the provided repository into dst
func (ts Triplestore) Snapshot(dst io.Writer, repo string) (int64, error) {
// SnapshotDB snapshots the provided repository into dst
func (ts Triplestore) SnapshotDB(dst io.Writer, repo string) (int64, error) {
res, err := ts.OpenRaw("GET", "/repositories/"+repo+"/statements?infer=false", nil, "", "application/n-quads")
if err != nil {
return 0, err