lib/elasticache_wrapper.rb in aws_client-0.0.9 vs lib/elasticache_wrapper.rb in aws_client-0.0.91

- old
+ new

@@ -1,10 +1,16 @@ ## API docs: http://docs.aws.amazon.com/sdkforruby/api/Aws/ElastiCache/Client.html module AwsClient class ElastiCacheWrapper < AwsClient::Wrapper + + def memcached_endpoints_by_identifier(identifier) + cluster = memcached_cluster_by_identifier(identifier) + return [] unless cluster + cluster.cache_nodes.collect{|cache_node| cache_node.endpoint } + end def redis_endpoints_by_identifier(identifier) cluster = redis_cluster_by_identifier(identifier) return [] unless cluster cluster.cache_nodes.collect{|cache_node| cache_node.endpoint } @@ -12,10 +18,10 @@ def redis_cluster_by_identifier(identifier) redis_clusters.select{|cluster| cluster.cache_cluster_id == identifier }.first end - def memcached_cluster_by_identfier(identifier) + def memcached_cluster_by_identifier(identifier) memcache_clusters.select{|cluster| cluster.cache_cluster_id == identifier }.first end def redis_clusters clusters_by_engine_type("redis")