engine: graph: Allow Recv overriding for Send/Recv

This allows us to pass in an alternate implementation for Recv, if we
want to temporarily use a different data source.
This commit is contained in:
James Shubin
2024-01-20 03:21:10 -05:00
parent 091bf3a64c
commit 1630eafbe3
2 changed files with 15 additions and 4 deletions

View File

@@ -121,7 +121,7 @@ func (obj *Engine) Process(ctx context.Context, vertex pgraph.Vertex) error {
if obj.Debug {
obj.Logf("SendRecv: %s", res) // receiving here
}
if updated, err := SendRecv(res); err != nil {
if updated, err := SendRecv(res, nil); err != nil {
return errwrap.Wrapf(err, "could not SendRecv")
} else if len(updated) > 0 {
//for _, s := range graph.UpdatedStrings(updated) {