Example #1
0
func main() {
	flag.Parse()

	logging.Init(*verbose)

	container_provider := containers.NewContainerPorts(*image_name, *proxyPort)

	proxy := NewMultipleHostReverseProxy(*container_provider)
	http.ListenAndServe(":9090", proxy)

}
Example #2
0
func main() {
	flag.Parse()

	logging.Init(*verbose)

	container_ports := NewContainerPorts()

	s := &proxy.Server{
		LocalAddr: "0.0.0.0:9999",
		Verbose:   true,
		Ports:     container_ports,
	}
	s.Run()
}
Example #3
0
func main() {
	flag.Parse()
	logging.Init(*verbose)
	redis_client := redis.NewClient(&redis.Options{
		Addr:     *redis_addr,
		Password: "", // no password set
		DB:       0,  // use default DB
	})

	s := &proxy.Server{
		LocalAddr: *localAddr,
		Verbose:   *verbose,
		Ports:     &RedisPorts{key: *localAddr, redis_client: redis_client},
	}
	s.Run()
}