all: add pull API config based on special DNS query

For query domain that matches "uid.verify.controld.com" in cd mode, and
the uid has the same value with "--cd" flag, ctrld will fetch uid config
from ControlD API, using this config if valid.

This is useful for force syncing API without waiting until the API
reload ticker fire.
This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2024-09-30 18:17:00 +07:00
1 parent ede354166b
commit e6f256d640
4 files changed
+90 -48

No files matched your search

+1
View File
@@ -1141,6 +1141,7 @@ func run(appCallback *AppCallback, stopCh chan struct{}) {
reloadDoneCh: make(chan struct{}),
dnsWatcherStopCh: make(chan struct{}),
apiReloadCh: make(chan *ctrld.Config),
apiForceReloadCh: make(chan struct{}),
cfg: &cfg,
appCallback: appCallback,
}