(results map[string]AggregatorResErr, keyOrder []string)
| 833 | } |
| 834 | |
| 835 | func (a *DefaultKeyedAggregator) BatchAddWithKeyOrder(results map[string]AggregatorResErr, keyOrder []string) error { |
| 836 | a.mu.Lock() |
| 837 | defer a.mu.Unlock() |
| 838 | |
| 839 | a.keyOrder = keyOrder |
| 840 | for key, res := range results { |
| 841 | err := a.addWithKey(key, res.Result, res.Err) |
| 842 | if err != nil { |
| 843 | return nil |
| 844 | } |
| 845 | |
| 846 | if res.Err != nil { |
| 847 | return nil |
| 848 | } |
| 849 | } |
| 850 | |
| 851 | return nil |
| 852 | } |
| 853 | |
| 854 | func (a *DefaultKeyedAggregator) SetKeyOrder(keyOrder []string) { |
| 855 | a.mu.Lock() |
no test coverage detected