Updated DispatcherH register API

This commit is contained in:
Trial97
2020-08-20 15:29:27 +03:00
committed by Dan Christian Bogos
parent ef84af834c
commit 626b8b2404
16 changed files with 158 additions and 78 deletions

View File

@@ -32,6 +32,7 @@ import (
"syscall"
"time"
"github.com/cgrates/cgrates/dispatcherh"
"github.com/cgrates/cgrates/loaders"
v1 "github.com/cgrates/cgrates/apier/v1"
@@ -504,7 +505,9 @@ func main() {
// Rpc/http server
server := utils.NewServer()
if len(cfg.HTTPCfg().DispatchersRegistrarURL) != 0 {
server.RegisterHttpFunc(cfg.HTTPCfg().DispatchersRegistrarURL, dispatcherh.Registar)
}
if *httpPprofPath != "" {
go server.RegisterProfiler(*httpPprofPath)
}