Skip to content

Commit

Permalink
doc: Indicate possible states (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
raulb authored Oct 4, 2021
1 parent 40d95a7 commit 2e32f0e
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 14 deletions.
7 changes: 4 additions & 3 deletions cmd/meroxa/root/connectors/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ type Update struct {
flags struct {
Config string `long:"config" short:"c" usage:"new connector configuration"`
Name string `long:"name" usage:"new connector name"`
State string `long:"state" usage:"new connector state"`
State string `long:"state" usage:"new connector state (pause | resume | restart)"`
}
}

func (u *Update) Usage() string {
return "update NAME --state pause | resume | restart --name new-name --config new-configuration"
return "update NAME"
}

func (u *Update) Docs() builder.Docs {
Expand All @@ -59,7 +59,8 @@ func (u *Update) Docs() builder.Docs {
Example: "\n" +
"meroxa connector update old-name --name new-name' \n" +
"meroxa connector update connector-name --state pause' \n" +
"meroxa connector update connector-name --config '{\"table.name.format\":\"public.copy\"}' \n",
"meroxa connector update connector-name --config '{\"table.name.format\":\"public.copy\"}' \n" +
"meroxa connector update connector-name --state restart' \n",
}
}

Expand Down
5 changes: 3 additions & 2 deletions cmd/meroxa/root/pipelines/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type Update struct {
}

flags struct {
State string `long:"state" usage:"new pipeline state"`
State string `long:"state" usage:"new pipeline state (pause | resume | restart)"`
Name string `long:"name" usage:"new pipeline name"`
Metadata string `long:"metadata" short:"m" usage:"new pipeline metadata"`
}
Expand All @@ -60,7 +60,8 @@ func (u *Update) Docs() builder.Docs {
Example: "\n" +
"meroxa pipeline update old-name --name new-name\n" +
"meroxa pipeline update pipeline-name --state pause\n" +
"meroxa pipeline update pipeline-name --metadata '{\"key\":\"value\"}'",
"meroxa pipeline update pipeline-name --metadata '{\"key\":\"value\"}'\n" +
"meroxa pipeline update pipeline-name --state restart",
}
}

Expand Down
5 changes: 3 additions & 2 deletions docs/cmd/md/meroxa_connectors_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Update connector name, configuration or state

```
meroxa connectors update NAME --state pause | resume | restart --name new-name --config new-configuration [flags]
meroxa connectors update NAME [flags]
```

### Examples
Expand All @@ -13,6 +13,7 @@ meroxa connectors update NAME --state pause | resume | restart --name new-name -
meroxa connector update old-name --name new-name'
meroxa connector update connector-name --state pause'
meroxa connector update connector-name --config '{"table.name.format":"public.copy"}'
meroxa connector update connector-name --state restart'
```

Expand All @@ -22,7 +23,7 @@ meroxa connector update connector-name --config '{"table.name.format":"public.co
-c, --config string new connector configuration
-h, --help help for update
--name string new connector name
--state string new connector state
--state string new connector state (pause | resume | restart)
```

### Options inherited from parent commands
Expand Down
3 changes: 2 additions & 1 deletion docs/cmd/md/meroxa_pipelines_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ meroxa pipelines update NAME [flags]
meroxa pipeline update old-name --name new-name
meroxa pipeline update pipeline-name --state pause
meroxa pipeline update pipeline-name --metadata '{"key":"value"}'
meroxa pipeline update pipeline-name --state restart
```

### Options
Expand All @@ -21,7 +22,7 @@ meroxa pipeline update pipeline-name --metadata '{"key":"value"}'
-h, --help help for update
-m, --metadata string new pipeline metadata
--name string new pipeline name
--state string new pipeline state
--state string new pipeline state (pause | resume | restart)
```

### Options inherited from parent commands
Expand Down
5 changes: 3 additions & 2 deletions docs/cmd/www/meroxa-connectors-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ url: /cli/cmd/meroxa-connectors-update/
Update connector name, configuration or state

```
meroxa connectors update NAME --state pause | resume | restart --name new-name --config new-configuration [flags]
meroxa connectors update NAME [flags]
```

### Examples
Expand All @@ -20,6 +20,7 @@ meroxa connectors update NAME --state pause | resume | restart --name new-name -
meroxa connector update old-name --name new-name'
meroxa connector update connector-name --state pause'
meroxa connector update connector-name --config '{"table.name.format":"public.copy"}'
meroxa connector update connector-name --state restart'
```

Expand All @@ -29,7 +30,7 @@ meroxa connector update connector-name --config '{"table.name.format":"public.co
-c, --config string new connector configuration
-h, --help help for update
--name string new connector name
--state string new connector state
--state string new connector state (pause | resume | restart)
```

### Options inherited from parent commands
Expand Down
3 changes: 2 additions & 1 deletion docs/cmd/www/meroxa-pipelines-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ meroxa pipelines update NAME [flags]
meroxa pipeline update old-name --name new-name
meroxa pipeline update pipeline-name --state pause
meroxa pipeline update pipeline-name --metadata '{"key":"value"}'
meroxa pipeline update pipeline-name --state restart
```

### Options
Expand All @@ -28,7 +29,7 @@ meroxa pipeline update pipeline-name --metadata '{"key":"value"}'
-h, --help help for update
-m, --metadata string new pipeline metadata
--name string new pipeline name
--state string new pipeline state
--state string new pipeline state (pause | resume | restart)
```

### Options inherited from parent commands
Expand Down
5 changes: 3 additions & 2 deletions etc/man/man1/meroxa-connectors-update.1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ meroxa\-connectors\-update \- Update connector name, configuration or state

.SH SYNOPSIS
.PP
\fBmeroxa connectors update NAME \-\-state pause | resume | restart \-\-name new\-name \-\-config new\-configuration [flags]\fP
\fBmeroxa connectors update NAME [flags]\fP


.SH DESCRIPTION
Expand All @@ -31,7 +31,7 @@ Update connector name, configuration or state

.PP
\fB\-\-state\fP=""
new connector state
new connector state (pause | resume | restart)


.SH OPTIONS INHERITED FROM PARENT COMMANDS
Expand Down Expand Up @@ -61,6 +61,7 @@ Update connector name, configuration or state
meroxa connector update old\-name \-\-name new\-name'
meroxa connector update connector\-name \-\-state pause'
meroxa connector update connector\-name \-\-config '{"table.name.format":"public.copy"}'
meroxa connector update connector\-name \-\-state restart'


.fi
Expand Down
3 changes: 2 additions & 1 deletion etc/man/man1/meroxa-pipelines-update.1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Update pipeline name, state or metadata

.PP
\fB\-\-state\fP=""
new pipeline state
new pipeline state (pause | resume | restart)


.SH OPTIONS INHERITED FROM PARENT COMMANDS
Expand Down Expand Up @@ -61,6 +61,7 @@ Update pipeline name, state or metadata
meroxa pipeline update old\-name \-\-name new\-name
meroxa pipeline update pipeline\-name \-\-state pause
meroxa pipeline update pipeline\-name \-\-metadata '{"key":"value"}'
meroxa pipeline update pipeline\-name \-\-state restart

.fi
.RE
Expand Down

0 comments on commit 2e32f0e

Please sign in to comment.