MCPcopy Index your code
hub / github.com/containerd/containerd / WithPlatform

Function WithPlatform

client/client_opts.go:137–149  ·  view source on GitHub ↗

WithPlatform allows the caller to specify a platform to retrieve content for

(platform string)

Source from the content-addressed store, hash-verified

135// WithPlatform allows the caller to specify a platform to retrieve
136// content for
137func WithPlatform(platform string) RemoteOpt {
138 if platform == "" {
139 platform = platforms.DefaultString()
140 }
141 return func(_ *Client, c *RemoteContext) error {
142 if slices.Contains(c.Platforms, platform) {
143 return nil
144 }
145
146 c.Platforms = append(c.Platforms, platform)
147 return nil
148 }
149}
150
151// WithPlatformMatcher specifies the matcher to use for
152// determining which platforms to pull content for.

Callers 3

TestExportAllCasesFunction · 0.50

Calls

no outgoing calls

Tested by 3

TestExportAllCasesFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…