Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow hot reloading the config file. #58

Open
W-Floyd opened this issue Mar 6, 2023 · 1 comment
Open

Allow hot reloading the config file. #58

W-Floyd opened this issue Mar 6, 2023 · 1 comment

Comments

@W-Floyd
Copy link
Owner

W-Floyd commented Mar 6, 2023

I don't even know how this would need to be designed at the moment, but it is something we should do to allow hotplugging support.

@W-Floyd
Copy link
Owner Author

W-Floyd commented Mar 12, 2023

In order to do this, device setup should be derived directly from config, without the concept of internal/external device.

Some fields in the config should be possible to change without a full reload of the device, for example, what command is used for the data, or the frequency of polling (basically, anything that isn't a part of the discovery message). Other fields will require republishing an amended discovery message, such as name, icon, measurement type, etc (most of the config actually).

I envision we'll need some lifecycle to a device, which will need to handle spawning a few goroutines that will listen on channels for signals to act on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant