NewClient returns a new plugin Client.
(config Config)
| 37 | |
| 38 | // NewClient returns a new plugin Client. |
| 39 | func NewClient(config Config) *Client { |
| 40 | userAgent := fmt.Sprintf("%s/%s (%s; %s %s)", |
| 41 | config.AppName, |
| 42 | config.AppVersion, |
| 43 | runtime.Version(), |
| 44 | runtime.GOARCH, |
| 45 | runtime.GOOS, |
| 46 | ) |
| 47 | client := Client{ |
| 48 | userAgent: userAgent, |
| 49 | connection: NewConnection(config.SkipSSLValidation, config.DialTimeout), |
| 50 | } |
| 51 | |
| 52 | return &client |
| 53 | } |