aboutsummaryrefslogtreecommitdiff
path: root/middleware/errors/errors.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 1-79/+0
* Rename middleware to plugin first pass; mostly used 'sed', few spots where I manually changed text. This still builds a coredns binary. * fmt error * Rename AddMiddleware to AddPlugin * Readd AddMiddleware to remain backwards compat
2017-08-06all: gometalinter (#843)Gravatar Miek Gieben 1-7/+0
* kubernetes/reverse: remove deadcode * deadcode in errors and kubernetes removed * unnecessary conversion * constants * proxy: time.Since() * simplications * static check * Disable test/external_test
2017-05-31middleware/{log,errors}: output everything to stdout (#684)Gravatar Miek Gieben 1-25/+2
Limit the options in both errors and log middleware, just output to stdout and let someone else (journald,docker) care about where to route the logs. This removes syslog and logging to a file. Fixes #573 #602
2017-02-22Fix import path `github.com/miekg/coredns` -> `github.com/coredns/coredns` ↵Gravatar Yong Tang 1-2/+2
(#547) This fix fixes import path from `github.com/miekg/coredns` -> `github.com/coredns/coredns`
2016-12-20Add middleware.NextOrFailure (#462)Gravatar Miek Gieben 1-1/+1
This checks if the next middleware to be called is nil, and if so returns ServerFailure and an error. This makes the next calling more robust and saves some lines of code. Also prefix the error with the name of the middleware to aid in debugging.
2016-10-26middleware/metrics: cleanup (#355)Gravatar Miek Gieben 1-0/+2
* middleware/metrics: add more metrics middleware/cache: Add metrics for number of elements in the cache. Also export the total size. Update README to detail the new metrics. middleware/metrics Move metrics into subpackage called "vars". This breaks the import cycle and is cleaner. This allows vars.Report to be used in the the dnsserver to log refused queries. middleware/metrics: tests Add tests to the metrics framework. The metrics/test subpackage allows scraping of the local server. Do a few test scrape of the metrics that are defined in the metrics middleware. This also allows metrics integration tests to check if the caching and dnssec middleware export their metrics correctly. * update README * typos * fix tests
2016-09-23Golint2 (#280)Gravatar Miek Gieben 1-4/+5
* Fix linter errors * More linting fixes * More docs and making members private that dont need to be public * Fix linter errors * More linting fixes * More docs and making members private that dont need to be public * More lint fixes This leaves: ~~~ middleware/kubernetes/nametemplate/nametemplate.go:64:6: exported type NameTemplate should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:71:1: exported method NameTemplate.SetTemplate should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:108:1: exported method NameTemplate.GetZoneFromSegmentArray should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:116:1: exported method NameTemplate.GetNamespaceFromSegmentArray should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:120:1: exported method NameTemplate.GetServiceFromSegmentArray should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:124:1: exported method NameTemplate.GetTypeFromSegmentArray should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:135:1: exported method NameTemplate.GetSymbolFromSegmentArray should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:167:1: exported method NameTemplate.IsValid should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:182:6: exported type NameValues should have comment or be unexported middleware/kubernetes/util/util.go:1:1: package comment should be of the form "Package util ..." middleware/kubernetes/util/util.go:27:2: exported const WildcardStar should have comment (or a comment on this block) or be unexported middleware/proxy/lookup.go:66:1: exported method Proxy.Forward should have comment or be unexported middleware/proxy/proxy.go:24:6: exported type Client should have comment or be unexported middleware/proxy/proxy.go:107:1: exported function Clients should have comment or be unexported middleware/proxy/reverseproxy.go:10:6: exported type ReverseProxy should have comment or be unexported middleware/proxy/reverseproxy.go:16:1: exported method ReverseProxy.ServeDNS should have comment or be unexported middleware/proxy/upstream.go:42:6: exported type Options should have comment or be unexported ~~~ I plan on reworking the proxy anyway, so I'll leave that be.
2016-09-16Remove lumberjack logger (#257)Gravatar Yong Tang 1-6/+4
* Removed lumberjack from coremain As is mentioned in 251, this fix removed lumberjack from coremain. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Remove lumberjack from log middleware As mentioned in 251, lumberjack is not suitable for applications like CoreDNS so it is removed from the log middleware. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Update log/README.md as lumberjack has been removed Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Adjust default log output from `ioutil.Discard` to `os.Stdout` Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-07Cleanup: put middleware helper functions in pkgs (#245)Gravatar Miek Gieben 1-3/+5
Move all (almost all) Go files in middleware into their own packages. This makes for better naming and discoverability. Lot of changes elsewhere to make this change. The middleware.State was renamed to request.Request which is better, but still does not cover all use-cases. It was also moved out middleware because it is used by `dnsserver` as well. A pkg/dnsutil packages was added for shared, handy, dns util functions. All normalize functions are now put in normalize.go
2016-04-11Rename middleware/testing (#103)Gravatar Miek Gieben 1-2/+2
Rename to test and name the toplevel tests dir to test for consitency.
2016-04-09correct EDNS responses (#96)Gravatar Miek Gieben 1-0/+3
Tests updated as well and all the middleware. And Prometheus renamed to metrics (directive is still prometheus).
2016-03-19Errors directive testing and fixingGravatar Miek Gieben 1-3/+4
Drop a few tests and make it work and compile. Also add the documentation: errors.md
2016-03-19Use context.ContextGravatar Miek Gieben 1-2/+4
Rename the old Context to State and use context.Context in the middleware for intra-middleware communication and more.
2016-03-18First commitGravatar Miek Gieben 1-0/+100