write to kafka using request handler channel
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user