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

Function NewVFSFile

vfs.go:953–966  ·  view source on GitHub ↗
(client ReplicaClient, name string, logger *slog.Logger)

Source from the content-addressed store, hash-verified

951}
952
953func NewVFSFile(client ReplicaClient, name string, logger *slog.Logger) *VFSFile {
954 f := &VFSFile{
955 client: client,
956 name: name,
957 index: make(map[uint32]ltx.PageIndexElem),
958 pending: make(map[uint32]ltx.PageIndexElem),
959 logger: logger,
960 PollInterval: DefaultPollInterval,
961 CacheSize: DefaultCacheSize,
962 }
963 f.ctx, f.cancel = context.WithCancel(context.Background())
964 f.cond = sync.NewCond(&f.mu)
965 return f
966}
967
968// Pos returns the current position of the file.
969func (f *VFSFile) Pos() ltx.Pos {

Calls

no outgoing calls