Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-211: Added command flags for wscompression, resetthrottle, and referencethrottle. #212

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ resgate [options]
| <code>&nbsp;&nbsp;&nbsp;&nbsp;--putmethod &lt;methodName&gt;</code> | Call method name mapped to HTTP PUT requests |
| <code>&nbsp;&nbsp;&nbsp;&nbsp;--deletemethod &lt;methodName&gt;</code> | Call method name mapped to HTTP DELETE requests |
| <code>&nbsp;&nbsp;&nbsp;&nbsp;--patchmethod &lt;methodName&gt;</code> | Call method name mapped to HTTP PATCH requests |
| <code>&nbsp;&nbsp;&nbsp;&nbsp;--wscompression</code> | Enable WebSocket per message compression |
| <code>&nbsp;&nbsp;&nbsp;&nbsp;--resetthrottle &lt;limit&gt;</coce> | Limit on parallel requests sent in response to a system reset |
| <code>&nbsp;&nbsp;&nbsp;&nbsp;--referencethrottle &lt;limit&gt;</coce> | Limit on parallel requests sent when following resource references |
| <code>-c, --config &lt;file&gt;</code> | Configuration file in JSON format |

### Security options
Expand Down
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ Server Options:
--putmethod <methodName> Call method name mapped to HTTP PUT requests
--deletemethod <methodName> Call method name mapped to HTTP DELETE requests
--patchmethod <methodName> Call method name mapped to HTTP PATCH requests
--wscompression Enable WebSocket per message compression
--resetthrottle <limit> Limit on parallel requests sent in response to a system reset
--referencethrottle <limit> Limit on parallel requests sent when following resource references
-c, --config <file> Configuration file

Security Options:
Expand Down Expand Up @@ -158,6 +161,9 @@ func (c *Config) Init(fs *flag.FlagSet, args []string) {
fs.StringVar(&putMethod, "putmethod", "", "Call method name mapped to HTTP PUT requests.")
fs.StringVar(&deleteMethod, "deletemethod", "", "Call method name mapped to HTTP DELETE requests.")
fs.StringVar(&patchMethod, "patchmethod", "", "Call method name mapped to HTTP PATCH requests.")
fs.BoolVar(&c.WSCompression, "wscompression", false, "Enable WebSocket per message compression.")
fs.IntVar(&c.ResetThrottle, "resetthrottle", 0, "Limit on parallel requests sent in response to a system reset.")
fs.IntVar(&c.ReferenceThrottle, "referencethrottle", 0, "Limit on parallel requests sent when following resource references.")
fs.BoolVar(&c.Debug, "D", false, "Enable debugging output.")
fs.BoolVar(&c.Debug, "debug", false, "Enable debugging output.")
fs.BoolVar(&c.Trace, "V", false, "Enable trace logging.")
Expand Down