-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.go
30 lines (24 loc) · 847 Bytes
/
main.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
package main
import (
"github.com/mirceanton/external-dns-provider-mikrotik/internal/configuration"
"github.com/mirceanton/external-dns-provider-mikrotik/internal/dnsprovider"
"github.com/mirceanton/external-dns-provider-mikrotik/internal/logging"
"github.com/mirceanton/external-dns-provider-mikrotik/internal/server"
"github.com/mirceanton/external-dns-provider-mikrotik/pkg/webhook"
log "github.com/sirupsen/logrus"
)
var (
version = "dev"
commit = "none"
)
func main() {
logging.Init()
log.Infof("starting external-dns-provider-mikrotik version: %s (%s)", version, commit)
config := configuration.Init()
provider, err := dnsprovider.Init(config)
if err != nil {
log.Fatalf("failed to initialize provider: %v", err)
}
main, health := server.Init(config, webhook.New(provider))
server.ShutdownGracefully(main, health)
}