MCPcopy Create free account
hub / github.com/astercloud/aster / Read

Method Read

pkg/backends/composite.go:135–138  ·  view source on GitHub ↗

Read 实现 BackendProtocol.Read

(ctx context.Context, path string, offset, limit int)

Source from the content-addressed store, hash-verified

133
134// Read 实现 BackendProtocol.Read
135func (b *CompositeBackend) Read(ctx context.Context, path string, offset, limit int) (string, error) {
136 backend, strippedPath := b.selectBackend(path)
137 return backend.Read(ctx, strippedPath, offset, limit)
138}
139
140// Write 实现 BackendProtocol.Write
141func (b *CompositeBackend) Write(ctx context.Context, path, content string) (*WriteResult, error) {

Callers 1

Calls 2

selectBackendMethod · 0.95
ReadMethod · 0.65

Tested by 1