(s store.Reader, contextName string)
| 320 | } |
| 321 | |
| 322 | func resolveDockerEndpoint(s store.Reader, contextName string) (docker.Endpoint, error) { |
| 323 | if s == nil { |
| 324 | return docker.Endpoint{}, errors.New("no context store initialized") |
| 325 | } |
| 326 | ctxMeta, err := s.GetMetadata(contextName) |
| 327 | if err != nil { |
| 328 | return docker.Endpoint{}, err |
| 329 | } |
| 330 | epMeta, err := docker.EndpointFromContext(ctxMeta) |
| 331 | if err != nil { |
| 332 | return docker.Endpoint{}, err |
| 333 | } |
| 334 | return docker.WithTLSData(s, contextName, epMeta) |
| 335 | } |
| 336 | |
| 337 | // Resolve the Docker endpoint for the default context (based on config, env vars and CLI flags) |
| 338 | func resolveDefaultDockerEndpoint(opts *cliflags.ClientOptions) (docker.Endpoint, error) { |
no test coverage detected
searching dependent graphs…