mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
Changes needed to support external gRPC server middleware (#498)
The gRPC server middleware[1] needs access to the Server object in order to push the unpacked Msg through the normal middleware pipeline. These are the changes to core needed to make that possible. [1] https://github.com/infobloxopen/coredns-grpc
This commit is contained in:
committed by
Miek Gieben
parent
439d8b8d12
commit
3a04d2a306
@@ -21,6 +21,9 @@ type Config struct {
|
||||
// First consumer is the file middleware to looks for zone files in this place.
|
||||
Root string
|
||||
|
||||
// Server is the server that handles this config
|
||||
Server *Server
|
||||
|
||||
// Middleware stack.
|
||||
Middleware []middleware.Middleware
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ func NewServer(addr string, group []*Config) (*Server, error) {
|
||||
stack = site.Middleware[i](stack)
|
||||
}
|
||||
site.middlewareChain = stack
|
||||
site.Server = s
|
||||
}
|
||||
|
||||
return s, nil
|
||||
|
||||
Reference in New Issue
Block a user