MCPcopy Create free account
hub / github.com/Azure/peerd / Exists

Method Exists

pkg/cache/interface.go:14–14  ·  view source on GitHub ↗

Exists checks if the given chunk of the file is already cached.

(name string, offset int64)

Source from the content-addressed store, hash-verified

12
13 // Exists checks if the given chunk of the file is already cached.
14 Exists(name string, offset int64) bool
15
16 // GetOrCreate gets the cached value if available, otherwise downloads the file.
17 GetOrCreate(name string, offset int64, count int, fetch func() ([]byte, error)) ([]byte, error)

Callers 2

TestExistsFunction · 0.95
OpenMethod · 0.65

Implementers 1

fileCachepkg/cache/filecache.go

Calls

no outgoing calls

Tested by 1

TestExistsFunction · 0.76