Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "server", Short: "serve the battlesnake game engine", PreRun: func(c *cobra.Command, args []string) { if !promEnable { log.Info("prometheus exporter not enabled") return } log.WithField("addr", promListen).Info("starting prometheus exporter") http.Handle("/metrics", promhttp.Handler()) go func() { r := http.NewServeMux() r.Handle("/metrics", promhttp.Handler()) if err := http.ListenAndServe(promListen, r); err != nil { log.WithError(err).Warn("prometheus failes to listen") } }() }, Run: func(c *cobra.Command, args []string) { go controllerCmd.Run(c, args) go apiCmd.Run(c, args) workerCmd.Run(c, args) }, }
RootCmd provides the root run command.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.