Skip to content

Commit

Permalink
public getter for resizable/connection error stream
Browse files Browse the repository at this point in the history
  • Loading branch information
yue9944882 committed Apr 14, 2020
1 parent 718c810 commit cdfedcf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion util/src/main/java/io/kubernetes/client/Exec.java
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ static int parseExitCode(ApiClient client, InputStream inputStream) {
return -1;
}

protected static class ExecProcess extends Process {
public static class ExecProcess extends Process {
private final WebSocketStreamHandler streamHandler;
private int statusCode = -1;
private boolean isAlive = true;
Expand Down Expand Up @@ -425,6 +425,14 @@ public InputStream getErrorStream() {
return getInputStream(2);
}

public InputStream getConnectionErrorStream() {
return getInputStream(3);
}

public OutputStream getResizeStream() {
return streamHandler.getOutputStream(4);
}

private synchronized InputStream getInputStream(int stream) {
if (!input.containsKey(stream)) {
input.put(stream, streamHandler.getInputStream(stream));
Expand Down

0 comments on commit cdfedcf

Please sign in to comment.