mirror of
https://github.com/status-im/status-node-manager.git
synced 2025-02-21 08:48:12 +00:00
refactor(SNM config): Move rest config top level
This commit is contained in:
parent
ab80677ff5
commit
f54600b17e
@ -17,44 +17,46 @@ type
|
||||
|
||||
type
|
||||
StatusNodeManagerConfig* = object
|
||||
restEnabled* {.
|
||||
desc: "Enable the REST server"
|
||||
defaultValue: true
|
||||
name: "rest" .}: bool
|
||||
|
||||
restPort* {.
|
||||
desc: "Port for the REST server"
|
||||
defaultValue: defaultSNMRestPort
|
||||
defaultValueDesc: $defaultSNMRestPortDesc
|
||||
name: "rest-port" .}: Port
|
||||
|
||||
restAddress* {.
|
||||
desc: "Listening address of the REST server"
|
||||
defaultValue: defaultAdminListenAddress
|
||||
defaultValueDesc: $defaultAdminListenAddressDesc
|
||||
name: "rest-address" .}: IpAddress
|
||||
|
||||
restRequestTimeout* {.
|
||||
defaultValue: 0
|
||||
defaultValueDesc: "infinite"
|
||||
desc: "The number of seconds to wait until complete REST request " &
|
||||
"will be received"
|
||||
name: "rest-request-timeout" .}: Natural
|
||||
|
||||
restMaxRequestBodySize* {.
|
||||
defaultValue: 16_384
|
||||
desc: "Maximum size of REST request body (kilobytes)"
|
||||
name: "rest-max-body-size" .}: Natural
|
||||
|
||||
restMaxRequestHeadersSize* {.
|
||||
defaultValue: 128
|
||||
desc: "Maximum size of REST request headers (kilobytes)"
|
||||
name: "rest-max-headers-size" .}: Natural
|
||||
|
||||
case cmd* {.
|
||||
command
|
||||
defaultValue: SNMStartUpCmd.noCommand .}: SNMStartUpCmd
|
||||
|
||||
of SNMStartUpCmd.noCommand:
|
||||
restEnabled* {.
|
||||
desc: "Enable the REST server"
|
||||
defaultValue: true
|
||||
name: "rest" .}: bool
|
||||
|
||||
restPort* {.
|
||||
desc: "Port for the REST server"
|
||||
defaultValue: defaultSNMRestPort
|
||||
defaultValueDesc: $defaultSNMRestPortDesc
|
||||
name: "rest-port" .}: Port
|
||||
|
||||
restAddress* {.
|
||||
desc: "Listening address of the REST server"
|
||||
defaultValue: defaultAdminListenAddress
|
||||
defaultValueDesc: $defaultAdminListenAddressDesc
|
||||
name: "rest-address" .}: IpAddress
|
||||
|
||||
restRequestTimeout* {.
|
||||
defaultValue: 0
|
||||
defaultValueDesc: "infinite"
|
||||
desc: "The number of seconds to wait until complete REST request " &
|
||||
"will be received"
|
||||
name: "rest-request-timeout" .}: Natural
|
||||
|
||||
restMaxRequestBodySize* {.
|
||||
defaultValue: 16_384
|
||||
desc: "Maximum size of REST request body (kilobytes)"
|
||||
name: "rest-max-body-size" .}: Natural
|
||||
|
||||
restMaxRequestHeadersSize* {.
|
||||
defaultValue: 128
|
||||
desc: "Maximum size of REST request headers (kilobytes)"
|
||||
name: "rest-max-headers-size" .}: Natural
|
||||
discard
|
||||
|
||||
of SNMStartUpCmd.pair:
|
||||
qr* {.
|
||||
|
Loading…
x
Reference in New Issue
Block a user