projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
12483: Merge branch 'master' into 12483-writable-fs
[arvados.git]
/
sdk
/
go
/
keepclient
/
keepclient.go
diff --git
a/sdk/go/keepclient/keepclient.go
b/sdk/go/keepclient/keepclient.go
index 37d651e31fbd971defa3217d6c11e883c4a073cc..54a4a374b991b44c5a5e51878be980a1b78f9609 100644
(file)
--- a/
sdk/go/keepclient/keepclient.go
+++ b/
sdk/go/keepclient/keepclient.go
@@
-293,6
+293,12
@@
func (kc *KeepClient) Get(locator string) (io.ReadCloser, int64, string, error)
return kc.getOrHead("GET", locator)
}
return kc.getOrHead("GET", locator)
}
+// ReadAt() retrieves a portion of block from the cache if it's
+// present, otherwise from the network.
+func (kc *KeepClient) ReadAt(locator string, p []byte, off int) (int, error) {
+ return kc.cache().ReadAt(kc, locator, p, off)
+}
+
// Ask() verifies that a block with the given hash is available and
// readable, according to at least one Keep service. Unlike Get, it
// does not retrieve the data or verify that the data content matches
// Ask() verifies that a block with the given hash is available and
// readable, according to at least one Keep service. Unlike Get, it
// does not retrieve the data or verify that the data content matches