Logo
Explore Help
Sign In
Mirrors/coredns
1
0
Fork 0
You've already forked coredns
mirror of https://github.com/coredns/coredns.git synced 2025-10-29 01:04:15 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
eb10948689a7024389d820fd6466a1bd54f9a177
coredns/plugin/file/rrutil/util.go

19 lines
464 B
Go
Raw Normal View History

plugin/file: simplify locking (#3024) * plugin/file: simplify locking Simplify the locking, remove the reloadMu and just piggyback on the other lock for accessing content, which assumes things can be move underneath. Copy the Apex and Zone to new vars to make sure the pointer isn't updated from under us. The releadMu isn't need at all, the time.Ticker firing while we're reading means we will just miss that tick and get it on the next go. Add rrutil subpackage and put some more generic functions in there, that are now used from file and the tree package. This removes some duplication. Rename additionalProcessing that didn't actually do that to externalLookup, because that's what being done at some point. Signed-off-by: Miek Gieben <miek@miek.nl> * Update plugin/file/lookup.go Co-Authored-By: Michael Grosser <development@stp-ip.net>
2019-07-23 18:32:44 +00:00
// Package rrutil provides function to find certain RRs in slices.
package rrutil
import "github.com/miekg/dns"
// SubTypeSignature returns the RRSIG for the subtype.
func SubTypeSignature(rrs []dns.RR, subtype uint16) []dns.RR {
sigs := []dns.RR{}
// there may be multiple keys that have signed this subtype
for _, sig := range rrs {
if s, ok := sig.(*dns.RRSIG); ok {
if s.TypeCovered == subtype {
sigs = append(sigs, s)
}
}
}
return sigs
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.7 Page: 74ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API