Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2736241ee |
+25
-25
@@ -164,31 +164,6 @@ func (w *Watcher) Run(ctx context.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// cleanupRemovedTargets removes from the loaded state the domain,
|
|
||||||
// hostname and certificate entries of names no longer in the
|
|
||||||
// configuration, which changes only at a restart. Nothing is notified.
|
|
||||||
// A configured domain's own records are saved as a hostname entry under
|
|
||||||
// its name, which is kept.
|
|
||||||
func (w *Watcher) cleanupRemovedTargets() {
|
|
||||||
for _, name := range w.state.GetAllDomainNames() {
|
|
||||||
if !w.isDomain(name) {
|
|
||||||
w.state.DeleteDomainState(name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, name := range w.state.GetAllHostnames() {
|
|
||||||
if !w.isConfigured(name) {
|
|
||||||
w.state.DeleteHostnameState(name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, key := range w.state.GetAllCertificateKeys() {
|
|
||||||
if _, hostname := parseCertKey(key); !w.isConfigured(hostname) {
|
|
||||||
w.state.DeleteCertificateState(key)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// RunOnce performs a single complete monitoring cycle.
|
// RunOnce performs a single complete monitoring cycle.
|
||||||
// DNS checks run first so that port and TLS checks use
|
// DNS checks run first so that port and TLS checks use
|
||||||
// freshly resolved IP addresses. Port checks run before
|
// freshly resolved IP addresses. Port checks run before
|
||||||
@@ -226,6 +201,31 @@ func (w *Watcher) detectFirstRun() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cleanupRemovedTargets removes from the loaded state the domain,
|
||||||
|
// hostname and certificate entries of names no longer in the
|
||||||
|
// configuration, which changes only at a restart. Nothing is notified.
|
||||||
|
// A configured domain's own records are saved as a hostname entry under
|
||||||
|
// its name, which is kept.
|
||||||
|
func (w *Watcher) cleanupRemovedTargets() {
|
||||||
|
for _, name := range w.state.GetAllDomainNames() {
|
||||||
|
if !w.isDomain(name) {
|
||||||
|
w.state.DeleteDomainState(name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, name := range w.state.GetAllHostnames() {
|
||||||
|
if !w.isConfigured(name) {
|
||||||
|
w.state.DeleteHostnameState(name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, key := range w.state.GetAllCertificateKeys() {
|
||||||
|
if _, hostname := parseCertKey(key); !w.isConfigured(hostname) {
|
||||||
|
w.state.DeleteCertificateState(key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// runDNSChecks performs DNS resolution for all configured domains
|
// runDNSChecks performs DNS resolution for all configured domains
|
||||||
// and hostnames, updating state with freshly resolved records.
|
// and hostnames, updating state with freshly resolved records.
|
||||||
// This must complete before port or TLS checks run so those
|
// This must complete before port or TLS checks run so those
|
||||||
|
|||||||
Reference in New Issue
Block a user