func NewTtlCacheClb(address string, port string, lbType LoadBalancerType, ttl int) LoadBalancer { lib := dns.NewLookupLib(fmt.Sprintf("%s:%s", address, port)) cache := ttlcache.NewTtlCache(lib, ttl) return buildClb(cache, lbType) }
// Get new resolver with given ttl func NewResolver(ttl int) clb.LoadBalancer { lib := dns.NewDefaultLookupLib() cache := ttlcache.NewTtlCache(lib, ttl) return clb.NewRoundRobinClb(cache) }