OneSucceededAggregator returns the first non-error reply, if all shards errored, returns any one of those errors.
| 153 | // OneSucceededAggregator returns the first non-error reply, |
| 154 | // if all shards errored, returns any one of those errors. |
| 155 | type OneSucceededAggregator struct { |
| 156 | err atomic.Value |
| 157 | res atomic.Value |
| 158 | } |
| 159 | |
| 160 | func (a *OneSucceededAggregator) Add(result interface{}, err error) error { |
| 161 | if err != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected