MCPcopy
hub / github.com/containerd/containerd / Platform

Method Platform

core/sandbox/proxy/controller.go:89–104  ·  view source on GitHub ↗
(ctx context.Context, sandboxID string)

Source from the content-addressed store, hash-verified

87}
88
89func (s *remoteSandboxController) Platform(ctx context.Context, sandboxID string) (imagespec.Platform, error) {
90 resp, err := s.client.Platform(ctx, &api.ControllerPlatformRequest{
91 SandboxID: sandboxID,
92 Sandboxer: s.sandboxerName,
93 })
94 if err != nil {
95 return imagespec.Platform{}, errgrpc.ToNative(err)
96 }
97
98 platform := resp.GetPlatform()
99 return imagespec.Platform{
100 Architecture: platform.GetArchitecture(),
101 OS: platform.GetOS(),
102 Variant: platform.GetVariant(),
103 }, nil
104}
105
106func (s *remoteSandboxController) Stop(ctx context.Context, sandboxID string, opts ...sandbox.StopOpt) error {
107 var soptions sandbox.StopOptions

Callers

nothing calls this directly

Calls 5

GetArchitectureMethod · 0.80
GetOSMethod · 0.80
GetVariantMethod · 0.80
PlatformMethod · 0.65
GetPlatformMethod · 0.45

Tested by

no test coverage detected