Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CallbackName string ShowHistorical bool )
View Source
var ClientCommand = &cobra.Command{ Use: "client", Short: "Run the Hotline client", Run: func(cmd *cobra.Command, args []string) { cfg := config.LoadConfig(configPath) if cfg == nil { return } client.StartClient(CallbackName, ShowHistorical, cfg) }, }
View Source
var ServerCommand = &cobra.Command{ Use: "server", Short: "Run the Hotline server (set $HOTLINE_APP to configure which server to run)", Run: func(cmd *cobra.Command, args []string) { cfg := config.LoadConfig(configPath) if cfg == nil { return } hotlineApp := os.Getenv("HOTLINE_APP") switch hotlineApp { case "dns": log.Println("starting dns callback server") dns.StartServer(cfg) case "http": log.Println("starting http callback server") http.StartServer(cfg) case "web": log.Println("starting web server") web.StartApp(cfg) default: log.Fatalln("failed to launch server: you must set $HOTLINE_APP to dns, http, or web") } }, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.