MCPcopy
hub / github.com/restic/restic / Load

Method Load

internal/backend/backend.go:45–45  ·  view source on GitHub ↗

Load runs fn with a reader that yields the contents of the file at h at the given offset. If length is larger than zero, only a portion of the file is read. If the length is larger than zero and the file is too short to return the requested length bytes, then an error MUST be returned that is recogn

(ctx context.Context, h Handle, length int, offset int64, fn func(rd io.Reader) error)

Source from the content-addressed store, hash-verified

43 //
44 // Implementations are encouraged to use util.DefaultLoad
45 Load(ctx context.Context, h Handle, length int, offset int64, fn func(rd io.Reader) error) error
46
47 // Stat returns information about the File identified by h.
48 Stat(ctx context.Context, h Handle) (FileInfo, error)

Callers 15

ReadAtFunction · 0.65
RoundTripMethod · 0.65
LoadMethod · 0.65
TestOutOfBoundsAccessFunction · 0.65
TestForgetFunction · 0.65
ForgetMethod · 0.65
cacheFileMethod · 0.65
LoadMethod · 0.65
LoadMethod · 0.65
TestUploadLargeFileFunction · 0.65
TestConcurrencyLimitLoadFunction · 0.65
LoadMethod · 0.65

Implementers 11

Backendinternal/backend/azure/azure.go
b2Backendinternal/backend/b2/b2.go
Backendinternal/backend/s3/s3.go
MemoryBackendinternal/backend/mem/mem_backend.go
Backendinternal/backend/dryrun/dry_backend.go
Localinternal/backend/local/local.go
Backendinternal/backend/gs/gs.go
Backendinternal/backend/mock/backend.go
Backendinternal/backend/rest/rest.go
beSwiftinternal/backend/swift/swift.go
SFTPinternal/backend/sftp/sftp.go

Calls

no outgoing calls

Tested by 15

LoadMethod · 0.52
TestOutOfBoundsAccessFunction · 0.52
TestForgetFunction · 0.52
TestUploadLargeFileFunction · 0.52
TestConcurrencyLimitLoadFunction · 0.52
TestLimitBackendLoadFunction · 0.52
TestDryFunction · 0.52
TestBackendLoadRetryFunction · 0.52
testBackendLoadNotExistsFunction · 0.52