| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- // Copyright 2019 Yunion
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- package main
- import (
- "github.com/coredns/coredns/core/dnsserver"
- "github.com/coredns/coredns/coremain"
- _ "github.com/coredns/coredns/plugin/acl"
- _ "github.com/coredns/coredns/plugin/bind"
- _ "github.com/coredns/coredns/plugin/bufsize"
- _ "github.com/coredns/coredns/plugin/cache"
- _ "github.com/coredns/coredns/plugin/cancel"
- _ "github.com/coredns/coredns/plugin/chaos"
- _ "github.com/coredns/coredns/plugin/debug"
- _ "github.com/coredns/coredns/plugin/errors"
- _ "github.com/coredns/coredns/plugin/file"
- _ "github.com/coredns/coredns/plugin/forward"
- _ "github.com/coredns/coredns/plugin/health"
- _ "github.com/coredns/coredns/plugin/hosts"
- _ "github.com/coredns/coredns/plugin/loadbalance"
- _ "github.com/coredns/coredns/plugin/local"
- _ "github.com/coredns/coredns/plugin/log"
- _ "github.com/coredns/coredns/plugin/loop"
- _ "github.com/coredns/coredns/plugin/metrics" // prometheus
- _ "github.com/coredns/coredns/plugin/nsid"
- _ "github.com/coredns/coredns/plugin/ready"
- _ "github.com/coredns/coredns/plugin/reload"
- _ "github.com/coredns/coredns/plugin/rewrite"
- _ "github.com/coredns/coredns/plugin/timeouts"
- _ "github.com/coredns/coredns/plugin/trace"
- _ "github.com/coredns/coredns/plugin/whoami"
- _ "github.com/mholt/caddy/startupshutdown"
- _ "yunion.io/x/onecloud/pkg/dns"
- "yunion.io/x/onecloud/pkg/util/atexit"
- )
- var directives = []string{
- "cancel",
- "timeouts",
- "reload",
- "nsid",
- "bufsize",
- "bind",
- "debug",
- "trace",
- "ready",
- "health",
- "prometheus",
- "errors",
- "log",
- "local",
- "chaos",
- "loadbalance",
- "cache",
- "rewrite",
- "acl",
- "yunion",
- "hosts",
- "file",
- "loop",
- "forward",
- "whoami",
- "startup",
- "shutdown",
- }
- func init() {
- dnsserver.Directives = directives
- }
- func main() {
- defer atexit.Handle()
- coremain.Run()
- }
|