github.com/paulmey/terraform@v0.5.2-0.20150519145237-046e9b4c884d/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 Timeout int64 12 } 13 14 // Client() returns a new CloudStack client. 15 func (c *Config) NewClient() (*cloudstack.CloudStackClient, error) { 16 cs := cloudstack.NewAsyncClient(c.ApiURL, c.ApiKey, c.SecretKey, false) 17 cs.AsyncTimeout(c.Timeout) 18 return cs, nil 19 }