From 9ac3cab1b7b1b1e78f86ce3c6a80fbee312162e6 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Fri, 19 Aug 2016 17:14:17 -0700 Subject: Make CoreDNS a server type plugin for Caddy (#220) * Make CoreDNS a server type plugin for Caddy Remove code we don't need and port all middleware over. Fix all tests and rework the documentation. Also make `go generate` build a caddy binary which we then copy into our directory. This means `go build`-builds remain working as-is. And new etc instances in each etcd test for better isolation. Fix more tests and rework test.Server with the newer support Caddy offers. Fix Makefile to support new mode of operation. --- core/parse/parse.go | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 core/parse/parse.go (limited to 'core/parse/parse.go') diff --git a/core/parse/parse.go b/core/parse/parse.go deleted file mode 100644 index faef36c28..000000000 --- a/core/parse/parse.go +++ /dev/null @@ -1,32 +0,0 @@ -// Package parse provides facilities for parsing configuration files. -package parse - -import "io" - -// ServerBlocks parses the input just enough to organize tokens, -// in order, by server block. No further parsing is performed. -// If checkDirectives is true, only valid directives will be allowed -// otherwise we consider it a parse error. Server blocks are returned -// in the order in which they appear. -func ServerBlocks(filename string, input io.Reader, checkDirectives bool) ([]ServerBlock, error) { - p := parser{Dispenser: NewDispenser(filename, input)} - p.checkDirectives = checkDirectives - blocks, err := p.parseAll() - return blocks, err -} - -// allTokens lexes the entire input, but does not parse it. -// It returns all the tokens from the input, unstructured -// and in order. -func allTokens(input io.Reader) (tokens []token) { - l := new(lexer) - l.load(input) - for l.next() { - tokens = append(tokens, l.token) - } - return -} - -// ValidDirectives is a set of directives that are valid (unordered). Populated -// by config package's init function. -var ValidDirectives = make(map[string]struct{}) -- cgit v1.2.3