mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 07:16:38 +00:00
Refactor DNS server update to use structured hash type for configuration
This commit is contained in:
@@ -391,7 +391,15 @@ func (s *DefaultServer) UpdateDNSServer(serial uint64, update nbdns.Config) erro
|
||||
s.mux.Lock()
|
||||
defer s.mux.Unlock()
|
||||
|
||||
hash, err := hashstructure.Hash(update, hashstructure.FormatV2, &hashstructure.HashOptions{
|
||||
hashType := struct {
|
||||
ServiceEnable bool
|
||||
NameServerGroups []*nbdns.NameServerGroup
|
||||
}{
|
||||
ServiceEnable: update.ServiceEnable,
|
||||
NameServerGroups: update.NameServerGroups,
|
||||
}
|
||||
|
||||
hash, err := hashstructure.Hash(hashType, hashstructure.FormatV2, &hashstructure.HashOptions{
|
||||
ZeroNil: true,
|
||||
IgnoreZeroValue: true,
|
||||
SlicesAsSets: true,
|
||||
|
||||
Reference in New Issue
Block a user