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

Method Compact

vfs.go:2908–2913  ·  view source on GitHub ↗

Compact compacts source level files into the destination level. Returns ErrNoCompaction if there are no files to compact.

(ctx context.Context, level int)

Source from the content-addressed store, hash-verified

2906// Compact compacts source level files into the destination level.
2907// Returns ErrNoCompaction if there are no files to compact.
2908func (f *VFSFile) Compact(ctx context.Context, level int) (*ltx.FileInfo, error) {
2909 if f.compactor == nil {
2910 return nil, fmt.Errorf("compaction not enabled")
2911 }
2912 return f.compactor.Compact(ctx, level)
2913}
2914
2915// Snapshot creates a full database snapshot from remote LTX files.
2916// Unlike DB.Snapshot(), this reads from remote rather than local WAL.

Callers 1

monitorCompactionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected