Change config format to yaml; add replicators

This commit is contained in:
Ben Johnson
2020-12-18 13:21:29 -07:00
parent 85e97cd6ac
commit a4e66eb8d8
6 changed files with 107 additions and 20 deletions

8
db.go
View File

@@ -1,16 +1,14 @@
package litestream
import (
"bytes"
"context"
"database/sql"
"fmt"
"io"
"log"
"os"
"path/filepath"
"strings"
"sync"
"time"
)
const (
@@ -34,6 +32,10 @@ type DB struct {
cancel func()
wg sync.WaitGroup
// List of replicators for the database.
// Must be set before calling Open().
Replicators []Replicator
// Frequency at which to perform db sync.
MonitorInterval time.Duration
}