MCPcopy
hub / github.com/redis/go-redis / finishAggregation

Method finishAggregation

osscluster_router.go:480–488  ·  view source on GitHub ↗

finishAggregation completes the aggregation process and sets the result

(cmd Cmder, aggregator routing.ResponseAggregator)

Source from the content-addressed store, hash-verified

478
479// finishAggregation completes the aggregation process and sets the result
480func (c *ClusterClient) finishAggregation(cmd Cmder, aggregator routing.ResponseAggregator) error {
481 finalValue, finalErr := aggregator.Result()
482 if finalErr != nil {
483 cmd.SetErr(finalErr)
484 return finalErr
485 }
486
487 return c.setCommandValue(cmd, finalValue)
488}
489
490// pickArbitraryNode selects a master or slave shard using the configured ShardPicker
491func (c *ClusterClient) pickArbitraryNode(ctx context.Context) *clusterNode {

Callers 2

aggregateKeyedValuesMethod · 0.95
aggregateResponsesMethod · 0.95

Calls 3

setCommandValueMethod · 0.95
ResultMethod · 0.65
SetErrMethod · 0.65

Tested by

no test coverage detected