diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-16 09:17:35 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-17 18:38:44 -0400 |
commit | 1bc243ca607c22e232017b0f1b4badcde288a9b3 (patch) | |
tree | 7273d158c1184d2c582a15fc36af695eb1a20943 /lib/diskio | |
parent | 0f85e72d1331b49b52925d6cc5ad083a0376104c (diff) |
btrfstree: Have ReadNode return a *Node rather than a *diskio.Ref[Addr, Node]
... and take a ReaderAt instead of a diskio.File.
Diffstat (limited to 'lib/diskio')
-rw-r--r-- | lib/diskio/file_iface.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/diskio/file_iface.go b/lib/diskio/file_iface.go index d26ffcc..a30ddb0 100644 --- a/lib/diskio/file_iface.go +++ b/lib/diskio/file_iface.go @@ -9,11 +9,15 @@ import ( "io" ) +type ReaderAt[A ~int64] interface { + ReadAt(p []byte, off A) (n int, err error) +} + type File[A ~int64] interface { Name() string Size() A - Close() error - ReadAt(p []byte, off A) (n int, err error) + io.Closer + ReaderAt[A] WriteAt(p []byte, off A) (n int, err error) } |