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

Method Add

internal/routing/aggregator.go:296–311  ·  view source on GitHub ↗
(result interface{}, err error)

Source from the content-addressed store, hash-verified

294}
295
296func (a *AggMinAggregator) Add(result interface{}, err error) error {
297 if err != nil {
298 a.err.CompareAndSwap(nil, err)
299 return nil
300 }
301
302 floatVal, e := toFloat64(result)
303 if e != nil {
304 a.err.CompareAndSwap(nil, err)
305 return nil
306 }
307
308 a.res.Value(floatVal)
309
310 return nil
311}
312
313func (a *AggMinAggregator) BatchAdd(results map[string]AggregatorResErr) error {
314 min := int64(math.MaxInt64)

Callers 3

BatchAddMethod · 0.95
AddWithKeyMethod · 0.95
BatchSliceMethod · 0.95

Calls 2

toFloat64Function · 0.70
ValueMethod · 0.65

Tested by

no test coverage detected