Documentation
¶
Overview ¶
Package sign implements a zone signer as a hander.
Index ¶
- Constants
- Variables
- func Err(err error) slog.Attr
- func Expired(now, expire time.Time) int
- type KeyPair
- type Sign
- func (h *Sign) Err(err error) error
- func (s *Sign) Expired(origin string) (bool, error)
- func (s *Sign) HandlerFunc(next dns.HandlerFunc) dns.HandlerFunc
- func (h *Sign) Key() string
- func (s *Sign) Resign() error
- func (s *Sign) Setup(co *dnsserver.Controller) error
- func (s *Sign) Sign(origin string) (*zone.Zone, error)
- func (s Sign) Write(z *zone.Zone) error
Constants ¶
View Source
const Day = 24 * time.Hour
View Source
const Interval = 5 * time.Hour // Interval is the resign wake up interval.
View Source
const (
Namespace = "atomdns"
)
View Source
const Signed = ".signed"
Variables ¶
View Source
var ( // Duration is the metric used for exporting how fast we can sign each zone.. Duration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Namespace: Namespace, Subsystem: (&Sign{}).Key(), Name: "duration_seconds", Help: "Histogram of the time (in seconds) each zone signing took.", }, []string{"zone"}) // Expire is the metric used to track the signature expire. Expire = promauto.NewGaugeVec(prometheus.GaugeOpts{ Namespace: Namespace, Subsystem: (&Sign{}).Key(), Name: "rrsig_expire_timestamp", Help: "The zone's signature expire in unix epoch.", }, []string{"zone"}) )
Functions ¶
Types ¶
type KeyPair ¶
KeyPair holds DNSSEC key information, both the public and private components are stored here.
type Sign ¶
type Sign struct {
Path string
Directory string
KeyPairs []KeyPair
Zonemd bool
Zones map[string]*zone.Zone
// contains filtered or unexported fields
}
func (*Sign) Expired ¶
Expired returns true when 'a' signature on the SOA record has only 9 days left.
func (*Sign) HandlerFunc ¶
func (s *Sign) HandlerFunc(next dns.HandlerFunc) dns.HandlerFunc
func (*Sign) Resign ¶
Resign launches a resign routine that listens for _write_ events to the origin zone files and resigns them.
Click to show internal directories.
Click to hide internal directories.