()
| 211 | return records, nil |
| 212 | } |
| 213 | func (s *JSONFileStore) LoadPatterns() ([]QueryPatternRecord, error) { |
| 214 | s.mu.RLock() |
| 215 | defer s.mu.RUnlock() |
| 216 | |
| 217 | records := make([]QueryPatternRecord, 0, len(s.data.QueryPatterns)) |
| 218 | for _, r := range s.data.QueryPatterns { |
| 219 | records = append(records, r) |
| 220 | } |
| 221 | return records, nil |
| 222 | } |
| 223 | |
| 224 | func (s *JSONFileStore) Flush() error { |
| 225 | s.mu.Lock() |
no outgoing calls