github.com/hobbeswalsh/terraform@v0.3.7-0.20150619183303-ad17cf55a0fa/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 }