unioslo / zabbix-auto-config

MIT License
2 stars 5 forks source link

Add protocol types for imported modules #56

Closed pederhan closed 1 year ago

pederhan commented 1 year ago

This pull request adds protocol types (interfaces) for the importable host modifier and source collector modules. These types are runtime-checkable and are used to assert that the modules that ZAC imports fulfil the expected interfaces.

Tests have been added to ensure both typed and untyped modules pass isinstance() checks against the protocol types.

Furthermore, two new sections have been added to the README file that explain how to write source collector and host modifier modules.