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

Interface ResponseAggregator

internal/routing/aggregator.go:23–36  ·  internal/routing/aggregator.go::ResponseAggregator

ResponseAggregator defines the interface for aggregating responses from multiple shards.

Source from the content-addressed store, hash-verified

21
22// ResponseAggregator defines the interface for aggregating responses from multiple shards.
23type ResponseAggregator interface {
24 // Add processes a single shard response.
25 Add(result interface{}, err error) error
26
27 // AddWithKey processes a single shard response for a specific key (used by keyed aggregators).
28 AddWithKey(key string, result interface{}, err error) error
29
30 BatchAdd(map[string]AggregatorResErr) error
31
32 BatchSlice([]AggregatorResErr) error
33
34 // Result returns the final aggregated result and any error.
35 Result() (interface{}, error)
36}
37
38type AggregatorResErr struct {
39 Result interface{}

Callers 20

pubsub_test.goFile · 0.65
ForEachShardMethod · 0.65
sentinel_test.goFile · 0.65
TestAggLogicalOrBatchAddFunction · 0.95
aggregateKeyedValuesMethod · 0.65
aggregateResponsesMethod · 0.65

Implementers 10

AllSucceededAggregatorinternal/routing/aggregator.go
OneSucceededAggregatorinternal/routing/aggregator.go
AggSumAggregatorinternal/routing/aggregator.go
AggMinAggregatorinternal/routing/aggregator.go
AggMaxAggregatorinternal/routing/aggregator.go
AggLogicalAndAggregatorinternal/routing/aggregator.go
AggLogicalOrAggregatorinternal/routing/aggregator.go
DefaultKeylessAggregatorinternal/routing/aggregator.go
DefaultKeyedAggregatorinternal/routing/aggregator.go
SpecialAggregatorinternal/routing/aggregator.go

Calls

no outgoing calls

Tested by

no test coverage detected