Versions in this module Expand all Collapse all v0 v0.2.0 Mar 21, 2026 v0.1.0 Mar 21, 2026 Changes in this version + func New(opts Options) — js/wasm + func Register() — js/wasm + type FlushEvent struct + Duration time.Duration + Err error + File string + type Handle interface + Close func() error + Flush func() error + GetSize func() (int64, error) + Read func(buf []byte, offset int64) (int, error) + Truncate func(size int64) error + Write func(buf []byte, offset int64) (int, error) + type Observer interface + OnFlush func(file string, duration time.Duration, err error) + OnRead func(file string, offset int64, bytes int, duration time.Duration, err error) + OnWrite func(file string, offset int64, bytes int, duration time.Duration, err error) + type OpfsError struct + Err error + File string + Offset int64 + Op string + Size int + func (e *OpfsError) Error() string + func (e *OpfsError) Unwrap() error + type Options struct — js/wasm + Name string + Observer Observer + func DefaultOptions() Options + type ReadEvent struct + Bytes int + Duration time.Duration + Err error + File string + Offset int64 + type RecordingObserver struct + Flushes []FlushEvent + Reads []ReadEvent + Writes []WriteEvent + func (r *RecordingObserver) OnFlush(file string, dur time.Duration, err error) + func (r *RecordingObserver) OnRead(file string, offset int64, bytes int, dur time.Duration, err error) + func (r *RecordingObserver) OnWrite(file string, offset int64, bytes int, dur time.Duration, err error) + type Stats struct + BytesRead atomic.Int64 + BytesWritten atomic.Int64 + FlushTimeNs atomic.Int64 + Flushes atomic.Int64 + ReadTimeNs atomic.Int64 + Reads atomic.Int64 + WriteTimeNs atomic.Int64 + Writes atomic.Int64 + func (s *Stats) Reset() + func (s *Stats) Snapshot() StatsSnapshot + type StatsSnapshot struct + BytesRead int64 + BytesWritten int64 + FlushTimeNs int64 + Flushes int64 + ReadTimeNs int64 + Reads int64 + WriteTimeNs int64 + Writes int64 + type WriteEvent struct + Bytes int + Duration time.Duration + Err error + File string + Offset int64