示例#1
0
func NewDefaultClb(lbType LoadBalancerType) LoadBalancer {
	lib := dns.NewDefaultLookupLib()

	return buildClb(lib, lbType)
}
示例#2
0
文件: resolver.go 项目: godeep/goth
// Get new resolver with given ttl
func NewResolver(ttl int) clb.LoadBalancer {
	lib := dns.NewDefaultLookupLib()
	cache := ttlcache.NewTtlCache(lib, ttl)
	return clb.NewRoundRobinClb(cache)
}