(client ReplicaClient, name string, logger *slog.Logger)
| 951 | } |
| 952 | |
| 953 | func 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. |
| 969 | func (f *VFSFile) Pos() ltx.Pos { |
no outgoing calls