cleanup removes all of the user directories in the path of the mapper
()
| 43 | |
| 44 | // cleanup removes all of the user directories in the path of the mapper |
| 45 | func (m *mapper) cleanup() { |
| 46 | level.Info(m.logger).Log("msg", "cleaning up mapped rules directory", "path", m.Path) |
| 47 | |
| 48 | users, err := m.users() |
| 49 | if err != nil { |
| 50 | level.Error(m.logger).Log("msg", "unable to read rules directory", "path", m.Path, "err", err) |
| 51 | return |
| 52 | } |
| 53 | |
| 54 | for _, u := range users { |
| 55 | m.cleanupUser(u) |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | func (m *mapper) users() ([]string, error) { |
| 60 | var result []string |