// Run starts running scooter runtime
Run starts running scooter runtime
// Run starts running scooter runtime
func (s *Scooter) Run() {
	done := make(chan bool)
	for _, p := range s.config.HTTPProxies {
		proxy, err := http.NewHTTPProxy(p)
		if err != nil {
			log.Fatalf("Unable to create http proxy: %v", err)
		}
		go proxy.ListenAndServe()
	}
	for _, p := range s.config.HTTPSProxies {
		proxy, err := http.NewHTTPSProxy(p)
		if err != nil {
			log.Fatalf("Unable to create https proxy: %v", err)
		}
		go proxy.ListenAndServe()
	}
	for _, p := range s.config.TCPProxies {
		proxy, err := tcp.NewTCPProxy(p)
		if err != nil {
			log.Fatalf("Unable to create tcp proxy: %v", err)
		}
		go proxy.ListenAndServe()
	}
	apiServer := &s.config.APIServer
	go apiServer.ListenAndServe()
	prometheus := &s.config.MetricsServer.Prometheus
	if prometheus.Address != "" {
		go prometheus.ListenAndServe()
	}
	<-done
}
func ( s * Scooter ) Run ( ) { done := make ( chan bool ) for _ , p := range s . config . HTTPProxies { proxy , err := http . NewHTTPProxy ( p ) if err != nil { log . Fatalf ( " " , err ) } go proxy . ListenAndServe ( ) } for _ , p := range s . config . HTTPSProxies { proxy , err := http . NewHTTPSProxy ( p ) if err != nil { log . Fatalf ( " " , err ) } go proxy . ListenAndServe ( ) } for _ , p := range s . config . TCPProxies { proxy , err := tcp . NewTCPProxy ( p ) if err != nil { log . Fatalf ( " " , err ) } go proxy . ListenAndServe ( ) } apiServer := & s . config . APIServer go apiServer . ListenAndServe ( ) prometheus := & s . config . MetricsServer . Prometheus if prometheus . Address != " " { go prometheus . ListenAndServe ( ) } <- done }
Run starts running scooter runtime
Run starts running scooter runtime