Skip to content

Commit 9f1c913

Browse files
committed
server/streaming: add context to methods
Signed-off-by: Peter Hunt~ <[email protected]>
1 parent eb4719b commit 9f1c913

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/streaming/streaming.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,14 +373,14 @@ var (
373373
_ portforward.PortForwarder = &criAdapter{}
374374
)
375375

376-
func (a *criAdapter) ExecInContainer(podName string, podUID apiTypes.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error {
376+
func (a *criAdapter) ExecInContainer(ctx context.Context, podName string, podUID apiTypes.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error {
377377
return a.Runtime.Exec(container, cmd, in, out, err, tty, resize)
378378
}
379379

380-
func (a *criAdapter) AttachContainer(podName string, podUID apiTypes.UID, container string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error {
380+
func (a *criAdapter) AttachContainer(ctx context.Context, podName string, podUID apiTypes.UID, container string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error {
381381
return a.Runtime.Attach(container, in, out, err, tty, resize)
382382
}
383383

384-
func (a *criAdapter) PortForward(podName string, podUID apiTypes.UID, port int32, stream io.ReadWriteCloser) error {
384+
func (a *criAdapter) PortForward(ctx context.Context, podName string, podUID apiTypes.UID, port int32, stream io.ReadWriteCloser) error {
385385
return a.Runtime.PortForward(podName, port, stream)
386386
}

0 commit comments

Comments
 (0)