MCPcopy Create free account
hub / github.com/docker/cli / newDefaultRepositoryEndpoint

Function newDefaultRepositoryEndpoint

internal/registryclient/endpoint.go:30–44  ·  view source on GitHub ↗
(ref reference.Named, insecure bool)

Source from the content-addressed store, hash-verified

28}
29
30func newDefaultRepositoryEndpoint(ref reference.Named, insecure bool) (repositoryEndpoint, error) {
31 indexInfo := registry.NewIndexInfo(ref)
32 endpoint, err := getDefaultEndpoint(ref, !indexInfo.Secure)
33 if err != nil {
34 return repositoryEndpoint{}, err
35 }
36 if insecure {
37 endpoint.TLSConfig.InsecureSkipVerify = true
38 }
39 return repositoryEndpoint{
40 repoName: reference.Path(reference.TrimNamed(ref)),
41 indexInfo: indexInfo,
42 endpoint: endpoint,
43 }, nil
44}
45
46func getDefaultEndpoint(repoName reference.Named, insecure bool) (registry.APIEndpoint, error) {
47 registryService, err := registry.NewService(registry.ServiceOptions{})

Callers 2

MountBlobMethod · 0.85
PutManifestMethod · 0.85

Calls 2

getDefaultEndpointFunction · 0.85
PathMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…