Adam Štrauch
e06a5cc94b
If there is an update in discovery an function is triggered that can pick it up.
13 lines
329 B
Go
13 lines
329 B
Go
package server
|
|
|
|
import "github.com/google/go-cmp/cmp"
|
|
|
|
// Compare compares discovery A and B and returns true if those two are different.
|
|
func Compare(discoveryA, discoveryB Discovery) bool {
|
|
discoveryA.LastCheck = 0
|
|
discoveryB.LastCheck = 0
|
|
discoveryA.TTL = 0
|
|
discoveryB.TTL = 0
|
|
return !cmp.Equal(discoveryA, discoveryB)
|
|
}
|