This commit is contained in:
Ben Johnson
2021-01-18 15:46:52 -07:00
parent f31c22af62
commit 7fb98df240
15 changed files with 60 additions and 166 deletions

View File

@@ -13,10 +13,9 @@ import (
"strings"
"syscall"
"time"
_ "github.com/mattn/go-sqlite3"
)
// Naming constants.
const (
MetaDirSuffix = "-litestream"
@@ -152,10 +151,6 @@ func readWALHeader(filename string) ([]byte, error) {
return buf[:n], err
}
func readCheckpointSeqNo(hdr []byte) uint32 {
return binary.BigEndian.Uint32(hdr[12:])
}
// readFileAt reads a slice from a file.
func readFileAt(filename string, offset, n int64) ([]byte, error) {
f, err := os.Open(filename)