Test webhook
This commit is contained in:
9
main.go
9
main.go
@@ -7,11 +7,14 @@ import (
|
||||
"os/signal"
|
||||
|
||||
logger "git.site.quack-lab.dev/dave/cylogger"
|
||||
wh "go-eve-pi/webhook"
|
||||
|
||||
"github.com/fasthttp/router"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
var webhook wh.Webhook
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
logger.InitFlag()
|
||||
@@ -27,6 +30,8 @@ func main() {
|
||||
logger.Error("Failed to create SSO instance %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
webhook = wh.NewZulipWebhook(options.ZulipURL, options.ZulipEmail, options.ZulipToken)
|
||||
|
||||
// Setup fasthttp router
|
||||
r := router.New()
|
||||
@@ -70,6 +75,10 @@ func main() {
|
||||
}
|
||||
}()
|
||||
|
||||
for i := 0; i < 10; i++ {
|
||||
webhook.Post("eve-pi", "test", "test")
|
||||
}
|
||||
|
||||
// Listen for SIGINT and gracefully shut down the server
|
||||
sigCh := make(chan os.Signal, 1)
|
||||
signal.Notify(sigCh, os.Interrupt)
|
||||
|
||||
Reference in New Issue
Block a user