Add prototype of pipeline api using connect

This includes refactoring of the http listener to use
a custom mux.
This commit is contained in:
2022-12-24 19:45:25 -07:00
parent 08e8104cd9
commit cd098d794d
10 changed files with 394 additions and 9 deletions
+2 -2
View File
@@ -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, "/")