-
Notifications
You must be signed in to change notification settings - Fork 0
/
ddrm.go
43 lines (33 loc) · 826 Bytes
/
ddrm.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//go:build client
// +build client
package main
// Build time information
var (
BuildVersion string
BuildDate string
GitRev string
BuildUser string
)
func main() {
// Initial application setup
parseCliFlags()
setupLogger()
printStartupBanner()
// Read configuration of app state and records to process
readAppConfig()
readRecordsConfig()
// Re-initialise the Redis cache if needed
reinitRedis()
// Run some tests and exit if requested
sendTestEmail()
testDnsClient()
// Setup the TUI if needed, along with the periodic tasks
setupTui()
setupPeriodicTasks()
// Run the record processor once outside the periodic scheduler just to prime the state
processRecords()
// Run the TUI, which has its own run loop
runTui()
// Run the main non-TUI loop if the TUI isn't needed
runLoop()
}