()
| 254 | } |
| 255 | |
| 256 | func (d *dataNode) startDebugServer() { |
| 257 | debugRouter := mux.NewRouter() |
| 258 | debugRouter.PathPrefix("/node_modules/").Handler(d.handlers.nodeModuleHandler) |
| 259 | debugRouter.PathPrefix("/static/").Handler(d.handlers.debugStaticHandler) |
| 260 | debugRouter.HandleFunc("/debug/pprof/cmdline", http.HandlerFunc(pprof.Cmdline)) |
| 261 | debugRouter.HandleFunc("/debug/pprof/profile", http.HandlerFunc(pprof.Profile)) |
| 262 | debugRouter.HandleFunc("/debug/pprof/symbol", http.HandlerFunc(pprof.Symbol)) |
| 263 | debugRouter.HandleFunc("/debug/pprof/trace", http.HandlerFunc(pprof.Trace)) |
| 264 | debugRouter.PathPrefix("/debug/pprof/").Handler(http.HandlerFunc(pprof.Index)) |
| 265 | |
| 266 | d.handlers.debugHandler.Register(debugRouter.PathPrefix("/dbg").Subrouter()) |
| 267 | d.handlers.schemaHandler.RegisterForDebug(debugRouter.PathPrefix("/schema").Subrouter()) |
| 268 | |
| 269 | d.opts.InstrumentOptions().Logger().Infof("Starting HTTP server on dbg-port %d", d.opts.ServerConfig().DebugPort) |
| 270 | d.opts.InstrumentOptions().Logger().Fatal(http.ListenAndServe(fmt.Sprintf(":%d", d.opts.ServerConfig().DebugPort), debugRouter)) |
| 271 | } |
| 272 | |
| 273 | func (d *dataNode) startTableAdditionWatch() { |
| 274 | shardOwnershipEvents, done, err := d.metaStore.WatchShardOwnershipEvents() |
no test coverage detected