Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "jerem", Short: "Jerem bring observability to Jira", Run: func(cmd *cobra.Command, args []string) { config, err := core.LoadConfig() if err != nil { log.WithError(err).Fatal("Fail to load config") } go func() { e := echo.New() e.HideBanner = true address := viper.GetString("api.listen") e.GET("/health", func(c echo.Context) error { return c.NoContent(http.StatusOK) }) err := e.Start(address) if err != nil && err != http.ErrServerClosed { log.WithError(err).Error("cannot start HTTP server") } }() epicRunner := core.NewRunner(func() { runner.EpicRunner(config) }, viper.GetDuration("runner.period")+1*time.Second) sprintRunner := core.NewRunner(func() { runner.SprintRunner(config) }, viper.GetDuration("runner.period")) var gracefulStop = make(chan os.Signal, 1) signal.Notify(gracefulStop, syscall.SIGTERM) signal.Notify(gracefulStop, syscall.SIGINT) signal.Notify(gracefulStop, os.Interrupt) <-gracefulStop epicRunner.Stop() sprintRunner.Stop() }, }
RootCmd main command of jerem
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.