Created
December 9, 2014 15:28
-
-
Save ian-kent/e4a864950617c83743b8 to your computer and use it in GitHub Desktop.
elasticache.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/crowdmob/goamz/aws" | |
"github.com/crowdmob/goamz/elasticache" | |
) | |
func main() { | |
auth, err := aws.EnvAuth() | |
if err != nil { | |
log.Fatalf("Error getting AWS env auth: %s\n", err) | |
} | |
ec := elasticache.New(auth, aws.EUWest) | |
cc, err := ec.Describe("cache-cluster-name") | |
fmt.Printf("Host: %s\nPort: %d\n", cc.CacheNodes[0].Endpoint.Host, cc.CacheNodes[0].Endpoint.Port) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment