idempotent discovery#92
Open
travisghansen wants to merge 3 commits into
Open
Conversation
- formatting with prettier - support setting streamType - support using rinfo for mdns discovered host - support setting a timeout on ssdp requests - add eslint and prettier to dev deps Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
- prevent the same device from appearing multiple times - include manufacturer, modelName, lastSeen in per-device data - include options to gc devices not seen for a while - include options to auto-update - include options to enable/disable mdns/ssdp discovery - refactor some internal naming for better code clarity Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
Author
|
Any feedback on this one? |
alxhotel
approved these changes
Dec 23, 2024
| @@ -0,0 +1,11 @@ | |||
| module.exports = { | |||
| printWidth: 80, | |||
| trailingComma: 'es5', | |||
Owner
There was a problem hiding this comment.
Can we remove the trailing comma? Nothing wrong about it, I just don't like it 🙈
Author
There was a problem hiding this comment.
We can, however the default of prettier is actually more inclusive than even that value (adds them more places). Combined with the fact that prettier is moving towards fewer options and just trying to be the standard without really any tweaks it pushes us further from that.
In the end I don’t really care personally, as long as we have something that auto formats :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces logic to ensure (as well as possible) idempotency of
devices. It does this by utilizing a newuuidattribute on each device and ensuring that as newmdnsorssdpdata arrives that the correspondingdevicesimply has it's attributes updated if/when appropriate vs creating a new entry.Various other features are peppered throughout:
manufacturer,modelName, andlastSeenlastSeenattribute)device_onlineanddevice_offline(garbage collected) anddevice_updateddeviceevent behaves in a backwards-compatible wayhttp.getusage now has proper error handlinghttp.getnow has a configurabletimeoutsetting to prevent hangsstreamTypecan be set when sending mediarinfois used by default to detectmdnsdiscoveredhost(vs parsing thefoo.localaddress from DNS data)