MCPcopy Create free account
hub / github.com/conforma/cli / NewClient

Function NewClient

internal/utils/oci/client.go:93–105  ·  view source on GitHub ↗

NewClient constructs a new application_snapshot_image with the default client.

(ctx context.Context, opts ...remote.Option)

Source from the content-addressed store, hash-verified

91
92// NewClient constructs a new application_snapshot_image with the default client.
93func NewClient(ctx context.Context, opts ...remote.Option) Client {
94 client, ok := ctx.Value(clientContextKey).(Client)
95 if ok && client != nil {
96 return client
97 }
98
99 o := opts
100 if len(opts) == 0 {
101 o = CreateRemoteOptions(ctx)
102 }
103
104 return &defaultClient{ctx, o}
105}
106
107type defaultClient struct {
108 ctx context.Context

Callers 15

expandImageIndexFunction · 0.92
ValidateImageAccessMethod · 0.92
hasBundlesMethod · 0.92
ResolveDigestMethod · 0.92
ociBlobInternalFunction · 0.92
ociDescriptorFunction · 0.92
ociImageManifestFunction · 0.92
ociImageIndexFunction · 0.92
ociImageTagRefsFunction · 0.92

Calls 1

CreateRemoteOptionsFunction · 0.85

Tested by

no test coverage detected