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

Method PluginRead

input_file.go:289–299  ·  view source on GitHub ↗

PluginRead reads message from this plugin

()

Source from the content-addressed store, hash-verified

287
288// PluginRead reads message from this plugin
289func (i *FileInput) PluginRead() (*Message, error) {
290 var msg Message
291 select {
292 case <-i.exit:
293 return nil, ErrorStopped
294 case buf := <-i.data:
295 i.stats.Add("read_from", 1)
296 msg.Meta, msg.Data = payloadMetaWithBody(buf)
297 return &msg, nil
298 }
299}
300
301func (i *FileInput) String() string {
302 return "File input: " + i.path

Calls 1

payloadMetaWithBodyFunction · 0.85