caas-team / sparrow

A monitoring tool to gather infrastructure network information
Apache License 2.0
6 stars 4 forks source link

Feature: Generate Check Boilerplate Code #99

Open lvlcn-t opened 4 months ago

lvlcn-t commented 4 months ago

Is there an existing feature request for this?

Problem Description

Currently every check needs to be implemented manually and there's a risk that some default setups aren't correctly implemented. Also everytime a new check is registered it needs to be added to the runtime package which holds the runtime configuration for all checks.

Solution Description

Add a generate script and some templates to be filled by this script. Therefore you can use go templating with the text/template standard library. The script should generate the new check's boilerplate code and append the new check to the already existing runtime.Config and its utilizing methods.

Who can address the issue?

Everyone who wants to experience go templates 📝

Additional Context

I've started to implement this in feat/generate-check if you need some inspiration.