MCPcopy
hub / github.com/benbjohnson/litestream / initHydration

Method initHydration

vfs.go:1288–1299  ·  view source on GitHub ↗

initHydration starts the background hydration process.

(infos []*ltx.FileInfo)

Source from the content-addressed store, hash-verified

1286
1287// initHydration starts the background hydration process.
1288func (f *VFSFile) initHydration(infos []*ltx.FileInfo) error {
1289 f.hydrator = NewHydrator(f.hydrationPath, f.hydrationPersistent, f.pageSize, f.client, f.logger)
1290 if err := f.hydrator.Init(); err != nil {
1291 return err
1292 }
1293
1294 // Start background restore
1295 f.wg.Add(1)
1296 go f.runHydration(infos)
1297
1298 return nil
1299}
1300
1301// runHydration performs the background hydration process.
1302func (f *VFSFile) runHydration(infos []*ltx.FileInfo) {

Callers 1

OpenMethod · 0.95

Calls 3

runHydrationMethod · 0.95
NewHydratorFunction · 0.85
InitMethod · 0.65

Tested by

no test coverage detected