write to kafka using request handler channel

This commit is contained in:
“nishant-sharma”
2021-03-30 16:03:09 +05:30
parent 503dfdee98
commit 5acd0d552e
6 changed files with 38 additions and 48 deletions

View File

@@ -1,6 +1,8 @@
package server
import (
lib "com.navi.medici.janus/lib"
"io"
"io/ioutil"
"log"
@@ -17,5 +19,6 @@ func eventsHandler(w http.ResponseWriter, r *http.Request) {
}
w.Header().Set("Content-Type", "application/json")
lib.RequestChannel <- &lib.RequestObject{Body: body, Header: r.Header}
io.WriteString(w, "ok")
}