github.com/pingcap/chaos@v0.0.0-20190710112158-c86faf4b3719/pkg/core/checker.go (about) 1 package core 2 3 // Checker checks a history of operations. 4 type Checker interface { 5 // Check a series of operations with the given model. 6 // Return false or error if operations do not satisfy the model. 7 Check(m Model, ops []Operation) (bool, error) 8 9 // Name returns the unique name for the checker. 10 Name() string 11 } 12 13 // NoopChecker is a noop checker. 14 type NoopChecker struct{} 15 16 // Check impls Checker. 17 func (NoopChecker) Check(m Model, ops []Operation) (bool, error) { 18 return true, nil 19 } 20 21 // Name impls Checker. 22 func (NoopChecker) Name() string { 23 return "NoopChecker" 24 }