Documentation ¶
Index ¶
Constants ¶
View Source
const ( Port = "app.port" Timeout = "app.timeout" )
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "run", Short: "Runs the service", RunE: func(cmd *cobra.Command, args []string) error { if Builder == nil { return errors.New("nil builder func") } Logger.Infof("Building...") appHandler, err := Builder(root.Viper, Logger) if err != nil { return err } port := root.Viper.GetInt(Port) timeout := root.Viper.GetDuration(Timeout) Logger.Infof("Listening on port %d.", port) graceful.Run(":"+strconv.Itoa(port), timeout, appHandler) return nil }, }
View Source
var (
Logger = logrus.New()
)
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.