page_chunk.go 417 B

1234567891011121314151617
  1. package page_writer
  2. import (
  3. "io"
  4. )
  5. type SaveToStorageFunc func(reader io.Reader, offset int64, size int64, modifiedTsNs int64, cleanupFn func())
  6. type PageChunk interface {
  7. FreeResource()
  8. WriteDataAt(src []byte, offset int64, tsNs int64) (n int)
  9. ReadDataAt(p []byte, off int64, tsNs int64) (maxStop int64)
  10. IsComplete() bool
  11. ActivityScore() int64
  12. WrittenSize() int64
  13. SaveContent(saveFn SaveToStorageFunc)
  14. }