projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
7709: Merge branch 'master' into 7709-api-rails4
[arvados.git]
/
sdk
/
go
/
keepclient
/
keepclient.go
diff --git
a/sdk/go/keepclient/keepclient.go
b/sdk/go/keepclient/keepclient.go
index baf4bac02444170446c91a61c0b7469813bf308c..4f84afca61a413796fbb222eb5108473c449cfaf 100644
(file)
--- a/
sdk/go/keepclient/keepclient.go
+++ b/
sdk/go/keepclient/keepclient.go
@@
-72,6
+72,7
@@
type KeepClient struct {
lock sync.RWMutex
Client *http.Client
Retries int
lock sync.RWMutex
Client *http.Client
Retries int
+ BlockCache *BlockCache
// set to 1 if all writable services are of disk type, otherwise 0
replicasPerService int
// set to 1 if all writable services are of disk type, otherwise 0
replicasPerService int
@@
-406,6
+407,14
@@
func (kc *KeepClient) getSortedRoots(locator string) []string {
return found
}
return found
}
+func (kc *KeepClient) cache() *BlockCache {
+ if kc.BlockCache != nil {
+ return kc.BlockCache
+ } else {
+ return DefaultBlockCache
+ }
+}
+
type Locator struct {
Hash string
Size int // -1 if data size is not known
type Locator struct {
Hash string
Size int // -1 if data size is not known