MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/cloud-sql-proxy / Read

Method Read

internal/proxy/fuse.go:79–85  ·  view source on GitHub ↗

Read implements fs.NodeReader and supports incremental reads.

(_ context.Context, _ fs.FileHandle, dest []byte, off int64)

Source from the content-addressed store, hash-verified

77
78// Read implements fs.NodeReader and supports incremental reads.
79func (*readme) Read(_ context.Context, _ fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno) {
80 end := int(off) + len(dest)
81 if end > len(readmeText) {
82 end = len(readmeText)
83 }
84 return fuse.ReadResultData([]byte(readmeText[off:end])), fs.OK
85}
86
87// Open implements fs.NodeOpener and supports opening the README as a read-only
88// file.

Callers 2

proxyConnMethod · 0.80

Calls

no outgoing calls

Tested by 1