checker: implement ShareKey to mutualise pings across targets
A ping result depends only on the set of target addresses and the probe count, never on which domain or service the addresses belong to. Implement sdk.ObservationSharer so the host can collect a single ICMP probe per address set (per user) instead of re-pinging once per record: with 1.2.3.4 present in many domains under several A records, the same address was probed dozens of times for identical data. The share key sorts the resolved addresses and folds in the probe count; evaluation thresholds (warningRTT, ...) are intentionally excluded as they only affect how the shared observation is judged. Unresolvable inputs yield an empty key so the host falls back to per-target caching.
This commit is contained in:
parent
fb1b1204b4
commit
d4e64f6a2d
4 changed files with 88 additions and 3 deletions
4
go.sum
4
go.sum
|
|
@ -1,5 +1,5 @@
|
|||
git.happydns.org/checker-sdk-go v1.5.0 h1:5uD5Cm6xJ+lwnhbJ09iCXGHbYS9zRh+Yh0NeBHkAPBY=
|
||||
git.happydns.org/checker-sdk-go v1.5.0/go.mod h1:aNAcfYFfbhvH9kJhE0Njp5GX0dQbxdRB0rJ0KvSC5nI=
|
||||
git.happydns.org/checker-sdk-go v1.11.0 h1:+hs8OpcgvRMAoWyfqxih/Q0KYYUI1R8oFxO4RKioMLk=
|
||||
git.happydns.org/checker-sdk-go v1.11.0/go.mod h1:aNAcfYFfbhvH9kJhE0Njp5GX0dQbxdRB0rJ0KvSC5nI=
|
||||
git.happydns.org/happyDomain v0.7.0 h1:NV82/NbcSeRm0+IUZqaK3Vu9Ovl5+vv4AigUJZMdwws=
|
||||
git.happydns.org/happyDomain v0.7.0/go.mod h1:5tgkmqFE65kK359rY49V++49wgZ0gco+Gh9X6tbL+bY=
|
||||
github.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M=
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue