Wait on the process to exit and return the exit status and timestamp
(ctx context.Context)
| 132 | |
| 133 | // Wait on the process to exit and return the exit status and timestamp |
| 134 | func (p *process) Wait(ctx context.Context) (*runtime.Exit, error) { |
| 135 | response, err := p.shim.task.Wait(ctx, &task.WaitRequest{ |
| 136 | ID: p.shim.ID(), |
| 137 | ExecID: p.id, |
| 138 | }) |
| 139 | if err != nil { |
| 140 | return nil, errgrpc.ToNative(err) |
| 141 | } |
| 142 | return &runtime.Exit{ |
| 143 | Timestamp: protobuf.FromTimestamp(response.ExitedAt), |
| 144 | Status: response.ExitStatus, |
| 145 | }, nil |
| 146 | } |
| 147 | |
| 148 | func (p *process) Delete(ctx context.Context) (*runtime.Exit, error) { |
| 149 | response, err := p.shim.task.Delete(ctx, &task.DeleteRequest{ |
nothing calls this directly
no test coverage detected