update workflows

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-03-05 19:10:02 +03:00
parent 81016aa16f
commit 6da3bbabed
7 changed files with 61 additions and 14 deletions

View File

@@ -184,6 +184,14 @@ func (h *httpServer) NewHandler(handler interface{}, opts ...server.HandlerOptio
tp := reflect.TypeOf(handler)
if len(options.Metadata) == 0 {
if h.registerRPC {
h.opts.Logger.Infof(h.opts.Context, "register rpc handler for http.MethodPost %s /%s", hn, hn)
if err := hdlr.handlers.Insert([]string{http.MethodPost}, "/"+hn, pth); err != nil {
h.opts.Logger.Errorf(h.opts.Context, "cant add rpc handler for http.MethodPost %s /%s", hn, hn)
}
}
}
for hn, md := range options.Metadata {
var method reflect.Method
mname := hn[strings.Index(hn, ".")+1:]