Skip to content

Commit c68b4ef

Browse files
committed
feat(#35): update pipeline command
1 parent 88d2b2e commit c68b4ef

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/pipeline.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ pub enum Pipeline {
1717
HttpPlay,
1818
/// Render the party you are sharing through the http server, in the terminal
1919
HttpWatch,
20+
/// Play and share a party through a unix socket
21+
SocketPlay,
22+
/// Render the party you are sharing through a unix socket in realtime
23+
SocketWatch,
24+
/// Play and share a party through tcp
25+
TcpPlay,
26+
/// Render the party you are sharing through tcp in realtime
27+
TcpWatch,
2028
}
2129

2230
fn print_formatted_pipeline(pipeline: &str, prefix: &str) {
@@ -55,6 +63,20 @@ pub fn generate_command(pipeline: Option<Pipeline>, list: bool, prefix: &str) {
5563
Some(Pipeline::HttpWatch) => {
5664
print_formatted_pipeline("snakepipe stream-sse|snakepipe render", prefix)
5765
}
66+
Some(Pipeline::SocketPlay) => print_formatted_pipeline(
67+
"snakepipe gamestate|snakepipe socket-play|snakepipe render",
68+
prefix,
69+
),
70+
Some(Pipeline::SocketWatch) => {
71+
print_formatted_pipeline("snakepipe socket-watch|snakepipe render", prefix)
72+
}
73+
Some(Pipeline::TcpPlay) => print_formatted_pipeline(
74+
"snakepipe gamestate|snakepipe tcp-play|snakepipe render",
75+
prefix,
76+
),
77+
Some(Pipeline::TcpWatch) => {
78+
print_formatted_pipeline("snakepipe tcp-watch|snakepipe render", prefix)
79+
}
5880
None => {
5981
if list {
6082
println!("{}", "List of pipelines:".bold().underline());

0 commit comments

Comments
 (0)