Add prototype of pipeline api using connect
This includes refactoring of the http listener to use a custom mux.
This commit is contained in:
+2
-2
@@ -12,8 +12,8 @@ import (
|
||||
|
||||
var log = logging.MustGetLogger("cursorius-server")
|
||||
|
||||
func CreateWebhookHandler(runCh chan jobscheduler.Run, jobs map[string]config.Job) {
|
||||
http.HandleFunc("/webhook/", func(w http.ResponseWriter, r *http.Request) {
|
||||
func CreateWebhookHandler(runCh chan jobscheduler.Run, jobs map[string]config.Job, mux *http.ServeMux) {
|
||||
mux.HandleFunc("/webhook/", func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.Method {
|
||||
case "POST":
|
||||
splitUrl := strings.Split(r.URL.Path, "/")
|
||||
|
||||
Reference in New Issue
Block a user