MCPcopy
hub / github.com/containerd/containerd / Stop

Method Stop

core/sandbox/proxy/controller.go:106–124  ·  view source on GitHub ↗
(ctx context.Context, sandboxID string, opts ...sandbox.StopOpt)

Source from the content-addressed store, hash-verified

104}
105
106func (s *remoteSandboxController) Stop(ctx context.Context, sandboxID string, opts ...sandbox.StopOpt) error {
107 var soptions sandbox.StopOptions
108 for _, opt := range opts {
109 opt(&soptions)
110 }
111 req := &api.ControllerStopRequest{
112 SandboxID: sandboxID,
113 Sandboxer: s.sandboxerName,
114 }
115 if soptions.Timeout != nil {
116 req.TimeoutSecs = uint32(soptions.Timeout.Seconds())
117 }
118 _, err := s.client.Stop(ctx, req)
119 if err != nil {
120 return errgrpc.ToNative(err)
121 }
122
123 return nil
124}
125
126func (s *remoteSandboxController) Shutdown(ctx context.Context, sandboxID string) error {
127 _, err := s.client.Shutdown(ctx, &api.ControllerShutdownRequest{

Callers

nothing calls this directly

Calls 1

StopMethod · 0.65

Tested by

no test coverage detected