Commit Graph

10 Commits

Author SHA1 Message Date
Sebastiaan van Stijn de705907a5
client: remove solaris build-tag, simplify and gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-09 22:41:55 +02:00
Sebastiaan van Stijn 5979d6e7e3
client: add const for environment variables, and document them
This adds consts for the environment variables that are supported
by the client. These environment variables are unlikely to change,
or at least, unlikely to be removed, but having consts allows for
them to be documented.

I did not change all occurrences of these variables to use the const,
as they're used in various tests, and it's ok to use a fixture for
those, but it's nice to have a const available for (external) consumers
of the client package, and to have their purpose (and caveats)
documented in the code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-07 12:35:55 +01:00
Sebastiaan van Stijn c2c7e9d449
client: improve GoDoc, and minor touch-ups
- Improve documentation of various functions to better describe their behavior.
- Rename some variables to be more descriptive (as this is client code, used
  by external consumers, it's nice to be a bit more explicit).
- Remove a redundant check in `WithVersionFromEnv()`, as `WithVersion()`
  already checks for empty values.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-07 12:35:38 +01:00
Sebastiaan van Stijn 686be57d0a
Update to Go 1.17.0, and gofmt with Go 1.17
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-24 23:33:27 +02:00
Julien Pivotto 87a7fc1ced Enable client on netbsd and dragonfly
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-06-20 01:32:35 +02:00
Till Wegmüller bbf1edae4f Allow client consumers like traefik to compile on illumos
Signed-off-by: Till Wegmüller <toasterson@gmail.com>
2019-11-23 19:28:45 +01:00
Vincent Demeester 772edd020c Introduce NewClientWithOpts func to build custom client easily
This allows to create a client with default values and override those
using functors. As an example, `NewEnvClient()` becomes
`NewClientWithOpts(FromEnv)` ; and if you want a different api version
for this client : `NewClientWithOpts(FromEnv, WithVersion("1.35"))`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-08 15:26:24 +01:00
Daniel Nephin 4f0d95fa6e Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-05 16:51:57 -05:00
Yong Tang 4785f1a7ab Remove solaris build tag and `contrib/mkimage/solaris
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-11-02 00:01:46 +00:00
Michael Crosby 7c36a1af03 Move engine-api client package
This moves the engine-api client package to `/docker/docker/client`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-07 11:05:58 -07:00