This is package to create workers pull with graceful shutdown and panics catcher.
go get github.com/vkidmode/server-core/pkg/core
app := core.NewCore(customLogger, timeout, workersCount)
- you can use custom logger to log panic stack
- timeout used for shutting down app if it cant stop
- workers count is maximum count of simultaneously running workers
app.AddRunner(runner)
- It is possible to add runners in runtime
err = app.Launch(ctx)
- app will finish when all workers finish or error in worker happen