예제 #1
0
파일: main.go 프로젝트: sequenceiq/cbdproxy
func dnsLb() (c clb.LoadBalancer) {

	dnsHost := os.Getenv("DNS_HOST")
	if dnsHost != "" {
		dnsPort := os.Getenv("DNS_PORT")
		if dnsPort == "" {
			dnsPort = "53"
		}

		c = clb.NewClb(dnsHost, dnsPort, clb.RoundRobin)
	} else {
		c = clb.NewDefaultClb(clb.RoundRobin)
	}
	return c
}
예제 #2
0
// Client Factory
func NewTodoClient() *TodoClient {
	return &TodoClient{
		Lb:      clb.NewDefaultClb(clb.RoundRobin),
		Address: ServiceAddress,
	}
}