I am using this Remotecommand here https://github.com/kubernetes/client-go/blob/master/tools/remotecommand/remotecommand.go#L108 to execute a command on a pod and stream the result to an io.Writer
. As stated in the command above the function in the link the Stream does finish only when client or server disconnect. As the Stream config has only one command attached, why doesn't it close when the command has exited? How can I know when the command has finished?
Particularly I am transferring the result of tar -cf - ...
to the client and want to know when its finished.