API extensions: Route listerens (#887)

This commit is contained in:
Denis Makogon
2018-03-26 20:25:13 +03:00
committed by Reed Allman
parent 7810b3cb9b
commit 6393cf6777
4 changed files with 140 additions and 2 deletions

View File

@@ -111,6 +111,7 @@ type Server struct {
certKey string
certAuthority string
appListeners *appListeners
routeListeners *routeListeners
rootMiddlewares []fnext.Middleware
apiMiddlewares []fnext.Middleware
promExporter *prometheus.Exporter
@@ -516,7 +517,9 @@ func New(ctx context.Context, opts ...ServerOption) *Server {
s.bindHandlers(ctx)
s.appListeners = new(appListeners)
s.datastore = fnext.NewDatastore(s.datastore, s.appListeners)
s.routeListeners = new(routeListeners)
s.datastore = fnext.NewDatastore(s.datastore, s.appListeners, s.routeListeners)
return s
}