mirror of
https://github.com/status-im/consul.git
synced 2025-01-22 11:40:06 +00:00
Pre-allocations of DNS meta to avoid several allocations
This commit is contained in:
parent
93509690be
commit
c9e01ed0a3
@ -1694,7 +1694,7 @@ func (d *DNSServer) nodeServiceRecords(dc string, node structs.CheckServiceNode,
|
||||
}
|
||||
|
||||
func (d *DNSServer) generateMeta(dc string, qName string, node *structs.Node, ttl time.Duration) []dns.RR {
|
||||
var extra []dns.RR
|
||||
extra := make([]dns.RR, 0, len(node.Meta))
|
||||
for key, value := range node.Meta {
|
||||
txt := value
|
||||
if !strings.HasPrefix(strings.ToLower(key), "rfc1035-") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user