diff options
author | Valery Piashchynski <[email protected]> | 2020-12-22 23:02:25 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-22 23:02:25 +0300 |
commit | fd1e98bc6339abfa66523bf9d2208d00df8ee4bc (patch) | |
tree | b679441276717e687a5b460ebeba7ad0eee69be9 /cmd/main.go | |
parent | 40b6c3169931a3fef62b649db19ff01dc685b7d4 (diff) |
events listeners refactor, CLI initial commit
Diffstat (limited to 'cmd/main.go')
-rw-r--r-- | cmd/main.go | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/cmd/main.go b/cmd/main.go new file mode 100644 index 00000000..ed304252 --- /dev/null +++ b/cmd/main.go @@ -0,0 +1,40 @@ +package main + +import ( + "log" + + "github.com/spiral/endure" + "github.com/spiral/roadrunner-plugins/http" + "github.com/spiral/roadrunner-plugins/informer" + "github.com/spiral/roadrunner-plugins/metrics" + "github.com/spiral/roadrunner-plugins/redis" + "github.com/spiral/roadrunner-plugins/reload" + "github.com/spiral/roadrunner-plugins/resetter" + "github.com/spiral/roadrunner-plugins/rpc" + "github.com/spiral/roadrunner-plugins/server" + "github.com/spiral/roadrunner/v2/cmd/cli" +) + +func main() { + var err error + cli.Container, err = endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel), endure.RetryOnFail(false)) + if err != nil { + return + } + + err = cli.Container.RegisterAll( + &metrics.Plugin{}, + &redis.Plugin{}, + &http.Plugin{}, + &reload.Plugin{}, + &informer.Plugin{}, + &resetter.Plugin{}, + &rpc.Plugin{}, + &server.Plugin{}, + ) + if err != nil { + log.Fatal(err) + } + + cli.Execute() +} |