You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
350 B

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