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

18
replicator.go Normal file
View File

@@ -0,0 +1,18 @@
package litestream
type Replicator interface {
}
// FileReplicator is a replicator that replicates a DB to a local file path.
type FileReplicator struct {
db *DB // source database
dst string // destination path
}
// NewFileReplicator returns a new instance of FileReplicator.
func NewFileReplicator(db *DB, dst string) *FileReplicator {
return &FileReplicator{
db: db,
dst: dst,
}
}