plugin/log - Support for Metadata (#2251)

* - add metadata support to Log

* - adapt ctx after rebase
This commit is contained in:
Francois Tur
2018-11-13 14:20:49 -05:00
committed by John Belamaric
parent 35c5474660
commit 94c9aae323
5 changed files with 123 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
package rewrite
import (
"context"
"fmt"
"regexp"
"strings"
@@ -22,7 +23,7 @@ const (
NotMatch = "not_match"
)
func newReplacer(r *dns.Msg) replacer.Replacer { return replacer.New(r, nil, "") }
func newReplacer(r *dns.Msg) replacer.Replacer { return replacer.New(context.TODO(), r, nil, "") }
// condition is a rewrite condition.
type condition func(string, string) bool