Commit Graph

10 Commits

Author SHA1 Message Date
Sander van Harmelen 179b32d426 Add a `CredentialsForHost` method to disco.Disco
By adding this method you now only have to pass a `*disco.Disco` object around in order to do discovery and use any configured credentials for the discovered hosts.

Of course you can also still pass around both a `*disco.Disco` and a `auth.CredentialsSource` object if there is a need or a reason for that!
2018-08-03 11:29:11 +02:00
Sander van Harmelen 2c0c3771a9 Make sure to close the response body
And fix a few linter warnings while we're at it…
2018-06-29 16:14:54 +02:00
Paul Tyng c868092d2d
Standardize http.Client creation with User-Agent 2018-02-28 12:09:50 -05:00
Paul Tyng 344e8fca05
Relax typing to allow for http.RoundTripper 2018-02-28 11:40:17 -05:00
Martin Atkins 59939cf320 configs/configload: installation from registry and go-getter
Unlike the old installer in config/module, this uses new-style
installation directories that include the static module path so that paths
we show in diagnostics will be more meaningful to the user.

As before, we retrieve the entire "package" associated with the given
source string, rather than any given subdirectory directly, because the
retrieved module may contain ../ references into parent directories which
must be resolvable after extraction.
2018-02-15 15:56:39 -08:00
James Bardin eba73a3bb4
Merge pull request #17134 from hashicorp/jbardin/GH-17119
the trailing slash check caused a nil dereference
2018-01-17 19:07:19 -05:00
James Bardin 38f76ddc4e the trailing slash check caused a nil dereference
The disco package doesn't return errors, and a nil value indicates that
the input isn't valid. Always check for nil.
2018-01-17 18:31:05 -05:00
Masayuki Morita f440dba137 Standardize on log level "WARN" rather than "WARNING" 2018-01-16 18:05:26 -08:00
James Bardin 34b4000be9 allow discovery without trailing slash 2017-12-05 15:09:16 -05:00
James Bardin 91bd72f22b Create a registry.Client
This moves the registry specific functionality out of the module.Storage
and into its own package.
2017-12-05 14:58:48 -05:00