github.com/nalum/terraform@v0.3.2-0.20141223102918-aa2c22ffeff6/builtin/providers/cloudstack/config.go (about) 1 package cloudstack 2 3 import "github.com/xanzy/go-cloudstack/cloudstack" 4 5 // Config is the configuration structure used to instantiate a 6 // new CloudStack client. 7 type Config struct { 8 ApiURL string 9 ApiKey string 10 SecretKey string 11 } 12 13 // Client() returns a new CloudStack client. 14 func (c *Config) NewClient() (*cloudstack.CloudStackClient, error) { 15 cs := cloudstack.NewAsyncClient(c.ApiURL, c.ApiKey, c.SecretKey, false) 16 cs.AsyncTimeout(180) 17 return cs, nil 18 }