refactor(SNM config): Move rest config top level
This commit is contained in:
parent
ab80677ff5
commit
f54600b17e
|
@ -17,44 +17,46 @@ type
|
||||||
|
|
||||||
type
|
type
|
||||||
StatusNodeManagerConfig* = object
|
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* {.
|
case cmd* {.
|
||||||
command
|
command
|
||||||
defaultValue: SNMStartUpCmd.noCommand .}: SNMStartUpCmd
|
defaultValue: SNMStartUpCmd.noCommand .}: SNMStartUpCmd
|
||||||
|
|
||||||
of SNMStartUpCmd.noCommand:
|
of SNMStartUpCmd.noCommand:
|
||||||
restEnabled* {.
|
discard
|
||||||
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
|
|
||||||
|
|
||||||
of SNMStartUpCmd.pair:
|
of SNMStartUpCmd.pair:
|
||||||
qr* {.
|
qr* {.
|
||||||
|
|
Loading…
Reference in New Issue