finishAggregation completes the aggregation process and sets the result
(cmd Cmder, aggregator routing.ResponseAggregator)
| 478 | |
| 479 | // finishAggregation completes the aggregation process and sets the result |
| 480 | func (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 |
| 491 | func (c *ClusterClient) pickArbitraryNode(ctx context.Context) *clusterNode { |
no test coverage detected