MCPcopy
hub / github.com/containerd/containerd / Wait

Method Wait

client/sandbox.go:89–110  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

87}
88
89func (s *sandboxClient) Wait(ctx context.Context) (<-chan ExitStatus, error) {
90 c := make(chan ExitStatus, 1)
91 go func() {
92 defer close(c)
93
94 exitStatus, err := s.client.SandboxController(s.metadata.Sandboxer).Wait(ctx, s.ID())
95 if err != nil {
96 c <- ExitStatus{
97 code: UnknownExitStatus,
98 err: err,
99 }
100 return
101 }
102
103 c <- ExitStatus{
104 code: exitStatus.ExitStatus,
105 exitedAt: exitStatus.ExitedAt,
106 }
107 }()
108
109 return c, nil
110}
111
112func (s *sandboxClient) Stop(ctx context.Context) error {
113 return s.client.SandboxController(s.metadata.Sandboxer).Stop(ctx, s.ID())

Callers

nothing calls this directly

Calls 3

IDMethod · 0.95
WaitMethod · 0.65
SandboxControllerMethod · 0.65

Tested by

no test coverage detected