func (bootstrapInstanceIDHealer) getS3Endpoint() *s3.S3 { access, err := config.GetString("aws:access-key-id") if err != nil { log.Fatal(err.Error()) } secret, err := config.GetString("aws:secret-access-key") if err != nil { log.Fatal(err.Error()) } auth := aws.Auth{AccessKey: access, SecretKey: secret} return s3.New(auth, aws.USEast) }
func getEC2Endpoint() *ec2.EC2 { access, err := config.GetString("aws:access-key-id") if err != nil { log.Fatal(err.Error()) } secret, err := config.GetString("aws:secret-access-key") if err != nil { log.Fatal(err.Error()) } endpoint, err := config.GetString("aws:ec2:endpoint") if err != nil { log.Fatal(err.Error()) } auth := aws.Auth{AccessKey: access, SecretKey: secret} return ec2.New(auth, aws.Region{EC2Endpoint: endpoint}) }
func getELBEndpoint() *elb.ELB { access, err := config.GetString("aws:access-key-id") if err != nil { log.Fatal(err.Error()) } secret, err := config.GetString("aws:secret-access-key") if err != nil { log.Fatal(err.Error()) } endpoint, err := config.GetString("juju:elb-endpoint") if err != nil { log.Fatal(err.Error()) } auth := aws.Auth{AccessKey: access, SecretKey: secret} region := aws.Region{ELBEndpoint: endpoint} return elb.New(auth, region) }
func collection() *storage.Collection { name, err := config.GetString("docker:collection") if err != nil { log.Fatal(err.Error()) } conn, err := db.Conn() if err != nil { log.Errorf("Failed to connect to the database: %s", err) } return conn.Collection(name) }
func fatal(err error) { fmt.Println(err.Error()) log.Fatal(err.Error()) }
func fatal(err error) { log.Fatal(err.Error()) }