futriix/src/commands/shutdown.json
LiiNen ba8bda9cff
Fix shutdown syntax hint, following intention (#116)
Change syntax hint from

    SHUTDOWN [NOSAVE | SAVE] [NOW] [FORCE] [ABORT]

to

    SHUTDOWN [[NOSAVE | SAVE] [NOW] [FORCE] | ABORT]

It's not that important for docs, but the latter is preferred for valkey-cli's automatic syntax hints.

Signed-off-by: LiiNen <kjeonghoon065@gmail.com>
2024-04-02 15:36:53 +02:00

82 lines
3.0 KiB
JSON

{
"SHUTDOWN": {
"summary": "Synchronously saves the database(s) to disk and shuts down the server.",
"complexity": "O(N) when saving, where N is the total number of keys in all databases when saving data, otherwise O(1)",
"group": "server",
"since": "1.0.0",
"arity": -1,
"function": "shutdownCommand",
"history": [
[
"7.0.0",
"Added the `NOW`, `FORCE` and `ABORT` modifiers."
]
],
"command_flags": [
"ADMIN",
"NOSCRIPT",
"LOADING",
"STALE",
"NO_MULTI",
"SENTINEL",
"ALLOW_BUSY"
],
"arguments": [
{
"name": "abort-selector",
"type": "oneof",
"optional": true,
"arguments": [
{
"name": "save-selector-block",
"type": "block",
"arguments": [
{
"name": "save-selector",
"type": "oneof",
"optional": true,
"arguments": [
{
"name": "nosave",
"type": "pure-token",
"token": "NOSAVE"
},
{
"name": "save",
"type": "pure-token",
"token": "SAVE"
}
]
},
{
"name": "now",
"type": "pure-token",
"token": "NOW",
"optional": true,
"since": "7.0.0"
},
{
"name": "force",
"type": "pure-token",
"token": "FORCE",
"optional": true,
"since": "7.0.0"
}
]
},
{
"name": "abort",
"type": "pure-token",
"token": "ABORT",
"since": "7.0.0"
}
]
}
],
"reply_schema": {
"description": "OK if ABORT was specified and shutdown was aborted. On successful shutdown, nothing is returned since the server quits and the connection is closed. On failure, an error is returned.",
"const": "OK"
}
}
}