Audit audits two prometheus queries
(control, x model.Value)
| 19 | |
| 20 | // Audit audits two prometheus queries |
| 21 | func (a *Auditor) Audit(control, x model.Value) (Diff, error) { |
| 22 | if x.Type() == model.ValMatrix && control.Type() == model.ValMatrix { |
| 23 | return a.auditMatrix(x.(model.Matrix), control.(model.Matrix)) |
| 24 | } |
| 25 | |
| 26 | if x.Type() == model.ValVector && control.Type() == model.ValVector { |
| 27 | return a.auditVector(x.(model.Vector), control.(model.Vector)) |
| 28 | } |
| 29 | |
| 30 | return Diff{}, errors.Errorf("unsupported types for equality: got %s & %s", control.Type().String(), x.Type().String()) |
| 31 | } |
| 32 | |
| 33 | func (a *Auditor) auditMatrix(x, y model.Matrix) (diff Diff, err error) { |
| 34 | // different # of returned series |
no test coverage detected