Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ServeCmd = &cobra.Command{ Use: "serve", Short: "Serve Ava API", Long: `Serve Ava API.`, Run: func(cmd *cobra.Command, args []string) { logger := viper.Get("logger").(logger.ILogger) avaCfg := avaCfg.LoadConfiguration(logger) logger.Info("Serving Ava API") serverConfig := &api.Config{ HttpServerTimeout: httpServerTimeout, Port: port, PortMetrics: metricsPort, Host: "", Unhealthy: unhealthy, Unready: ready, } server, err := api.NewServer(serverConfig, logger, avaCfg) if err != nil { logger.Fatal(err.Error()) } httpServer, healthy, ready := server.ListenAndServe() stopCh := signals.SetupSignalHandler() sd, _ := signals.NewShutdown(serverShutdownTimeout, logger) sd.Graceful(stopCh, httpServer, healthy, ready) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.