seaweedfs/weed/filesys/page_writer/page_chunk.go

17 lines
350 B
Go
Raw Normal View History

package page_writer
import (
"io"
)
type SaveToStorageFunc func(reader io.Reader, offset int64, size int64, cleanupFn func())
2022-01-22 12:18:54 +00:00
type PageChunk interface {
FreeResource()
WriteDataAt(src []byte, offset int64) (n int)
2022-01-22 13:40:10 +00:00
ReadDataAt(p []byte, off int64) (maxStop int64)
IsComplete() bool
WrittenSize() int64
2022-01-22 13:40:10 +00:00
SaveContent(saveFn SaveToStorageFunc)
2022-01-22 12:18:54 +00:00
}