seaweedfs/weed/mount/page_writer/page_chunk.go

17 lines
399 B
Go
Raw Normal View History

2022-02-14 06:50:44 +00:00
package page_writer
import (
"io"
)
2022-12-23 04:39:24 +00:00
type SaveToStorageFunc func(reader io.Reader, offset int64, size int64, modifiedTsNs int64, cleanupFn func())
2022-02-14 06:50:44 +00:00
type PageChunk interface {
FreeResource()
2022-12-23 04:39:24 +00:00
WriteDataAt(src []byte, offset int64, tsNs int64) (n int)
ReadDataAt(p []byte, off int64, tsNs int64) (maxStop int64)
2022-02-14 06:50:44 +00:00
IsComplete() bool
LastModifiedTsNs() int64
2022-02-14 06:50:44 +00:00
SaveContent(saveFn SaveToStorageFunc)
}