MCPcopy
hub / github.com/probelabs/goreplay / ReadFrom

Method ReadFrom

middleware.go:68–71  ·  view source on GitHub ↗

ReadFrom start a worker to read from this plugin

(plugin PluginReader)

Source from the content-addressed store, hash-verified

66
67// ReadFrom start a worker to read from this plugin
68func (m *Middleware) ReadFrom(plugin PluginReader) {
69 Debug(2, fmt.Sprintf("[MIDDLEWARE] command[%q] Starting reading from %q", m.command, plugin))
70 go m.copy(m.Stdin, plugin)
71}
72
73func (m *Middleware) copy(to io.Writer, from PluginReader) {
74 var buf, dst []byte

Callers 3

initMiddlewareFunction · 0.95
StartMethod · 0.95
ReadMethod · 0.80

Calls 2

copyMethod · 0.95
DebugFunction · 0.70

Tested by 1

initMiddlewareFunction · 0.76