adyatlov / bun-deprecated

DC/OS diagnostics bundle analysis tool
The Unlicense
12 stars 4 forks source link

Reduce boilerplate for checks. #9

Closed rukletsov closed 6 years ago

rukletsov commented 6 years ago

Currently writing a check requires writing quite some boilerplate code. To facilitate adoption, reduce the amount of dummy code required to write a simple check.

One possible aproach is to introduce classes of checks containing all the necessary boilerplate. For example, a EachNode check class can take a node filter (master, agent, pattern), a file or JSON to read, and a predicate to apply to it.

Extra features, e.g., stopwatch or progress reporter, can be implemented via mixins.