Skip to content

Commit 322e8ad

Browse files
Merge pull request #157 from brendandburns/namespace
Add better docs to the WebSocket example.
2 parents cba9110 + bc1c4a9 commit 322e8ad

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

examples/src/main/java/io/kubernetes/client/examples/WebSocketsExample.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@
2525
import java.io.OutputStream;
2626
import java.io.Reader;
2727

28+
/**
29+
* This is a pretty low level, most people won't need to use WebSockets
30+
* directly.
31+
*
32+
* If you do need to run it, you can run:
33+
* mvn exec:java \
34+
* -Dexec.mainClass=io.kubernetes.client.examples.WebSocketsExample \
35+
* -Dexec.args=/api/v1/namespaces/default/pods/<podname>/attach?stdout=true
36+
*
37+
* Note that you'd think 'watch' calls were WebSockets, but you'd be wrong,
38+
* they're straight HTTP GET calls.
39+
*/
2840
public class WebSocketsExample {
2941
public static void main(String... args) throws ApiException, IOException {
3042
final ApiClient client = Config.defaultClient();
@@ -47,4 +59,4 @@ public void textMessage(Reader in) {
4759
}
4860
});
4961
}
50-
}
62+
}

0 commit comments

Comments
 (0)