Skip to content

Commit

Permalink
Restored topics structure (#61)
Browse files Browse the repository at this point in the history
This massive change restores the `topics/page.md` structure of the doc
repo, as it was a few years ago.

This is done using a script that is shared in the PR in a comment. This is
what it does:

1. The "aliases" metadata field in each markdown file is used to find
the original "topics" filename. This is attempted for all files in the
repo with a metadata section.
2. For files that don't have a "topics/" alias, pick a topics name for
it, like this:
   * Do this only for files under "docs/".
* If the file path matches "..../NAME/_index.md", the new name is
"topics/NAME.md"
* Otherwise, the file path matches "..../NAME" and then the new name is
"topics/NAME". (This case covers png files and other non-markdown files
too.)
* If the filename includes 'redis', this is replaced by 'valkey'.
Examples:
`docs/getting-started/installation/install-redis-from-source.md` ->
`topics/install-valkey-from-source.md`
* (Special case: If the target file name ends up "topics.md", use
"topics/index.md" instead.)
3. Rename the files to the new names. Commit the the renames.
4. Update all links to files (renamed and not renamed), using all
aliases discovered using all files with a metadata section.
* The links are changed to relative links including the `.md` suffix.
This makes it possible to click around in the github web interface. It's
also good in other situations. For example, users can deploy the docs
(simply .md -> .html) and don't need to deploy the docs in the root
directory.
   * Examples:
* Change link: /docs/reference/cluster-spec => cluster-spec.md (in
topics/protocol.md)
* Change link: /topics/acl => ../topics/acl.md (in commands/auth.md)

Additional changes:

* Fix broken link in cluster tutorial
* Remove some stub files with no real content (commands/_index.md, resources/_index.md)

Fixes #30

---------

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
  • Loading branch information
zuiderkwast authored Apr 24, 2024
1 parent a3f9046 commit baffe05
Show file tree
Hide file tree
Showing 147 changed files with 409 additions and 421 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ when processed, produce Markdown content. Here's an example:
...
"ACL CAT": [
"One of the following:",
"* [Array reply](/docs/reference/protocol-spec#arrays): an array of [Bulk string reply](/docs/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category.",
"* [Simple error reply](/docs/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given."
"* [Array reply](topics/protocol.md#arrays): an array of [Bulk string reply](topics/protocol.md#bulk-strings) elements representing ACL categories or commands in a given category.",
"* [Simple error reply](topics/protocol.md#simple-errors): the command returns an error if an invalid category name is given."
],
...
}
Expand Down
2 changes: 1 addition & 1 deletion _index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ title: Redis
linkTitle: Redis
---

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions, and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster. [Learn more →](/topics/introduction)
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions, and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster. [Learn more →](topics/introduction.md)
4 changes: 0 additions & 4 deletions commands/_index.md

This file was deleted.

8 changes: 4 additions & 4 deletions commands/acl-setuser.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ACL rules are either words like "on", "off", "reset", "allkeys", or are
special rules that start with a special character, and are followed by
another string (without any space in between), like "+SET".

The following documentation is a reference manual about the capabilities of this command, however our [ACL tutorial](/topics/acl) may be a more gentle introduction to how the ACL system works in general.
The following documentation is a reference manual about the capabilities of this command, however our [ACL tutorial](../topics/acl.md) may be a more gentle introduction to how the ACL system works in general.

## ACL rules

Expand All @@ -55,8 +55,8 @@ This is a list of all the supported Valkey ACL rules:
### Command rules

* `~<pattern>`: Adds the specified key pattern (glob style pattern, like in the `KEYS` command), to the list of key patterns accessible by the user. This grants both read and write permissions to keys that match the pattern. You can add multiple key patterns to the same user. Example: `~objects:*`
* `%R~<pattern>`: Adds the specified read key pattern. This behaves similar to the regular key pattern but only grants permission to read from keys that match the given pattern. See [key permissions](/topics/acl#key-permissions) for more information.
* `%W~<pattern>`: Adds the specified write key pattern. This behaves similar to the regular key pattern but only grants permission to write to keys that match the given pattern. See [key permissions](/topics/acl#key-permissions) for more information.
* `%R~<pattern>`: Adds the specified read key pattern. This behaves similar to the regular key pattern but only grants permission to read from keys that match the given pattern. See [key permissions](../topics/acl.md#key-permissions) for more information.
* `%W~<pattern>`: Adds the specified write key pattern. This behaves similar to the regular key pattern but only grants permission to write to keys that match the given pattern. See [key permissions](../topics/acl.md#key-permissions) for more information.
* `%RW~<pattern>`: Alias for `~<pattern>`.
* `allkeys`: Alias for `~*`, it allows the user to access all the keys.
* `resetkeys`: Removes all the key patterns from the list of key patterns the user can access.
Expand All @@ -80,7 +80,7 @@ This is a list of all the supported Valkey ACL rules:
* `#<hashedpassword>`: Adds the specified hashed password to the list of user passwords. A hashed password is hashed with SHA256 and translated into a hexadecimal string. Example: `#c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2`.
* `<password`: Like `>password` but removes the password instead of adding it.
* `!<hashedpassword>`: Like `#<hashedpassword>` but removes the password instead of adding it.
* `(<rule list>)`: Creates a new selector to match rules against. Selectors are evaluated after the user permissions, and are evaluated according to the order they are defined. If a command matches either the user permissions or any selector, it is allowed. See [selectors](/docs/management/security/acl#selectors) for more information.
* `(<rule list>)`: Creates a new selector to match rules against. Selectors are evaluated after the user permissions, and are evaluated according to the order they are defined. If a command matches either the user permissions or any selector, it is allowed. See [selectors](../topics/acl.md#selectors) for more information.
* `clearselectors`: Deletes all of the selectors attached to the user.
* `reset`: Removes any capability from the user. They are set to off, without passwords, unable to execute any command, unable to access any key.

Expand Down
2 changes: 1 addition & 1 deletion commands/acl.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This is a container command for [Access Control List](/docs/management/security/acl/) commands.
This is a container command for [Access Control List](../topics/acl.md) commands.

To see the list of available commands you can call `ACL HELP`.
2 changes: 1 addition & 1 deletion commands/asking.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ This is normally done automatically by cluster clients.

If an `-ASK` redirect is received during a transaction, only one ASKING command needs to be sent to the target node before sending the complete transaction to the target node.

See [ASK redirection in the Valkey Cluster Specification](/topics/cluster-spec#ask-redirection) for details.
See [ASK redirection in the Valkey Cluster Specification](../topics/cluster-spec.md#ask-redirection) for details.
4 changes: 2 additions & 2 deletions commands/auth.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
The AUTH command authenticates the current connection using the [Valkey ACL system](/topics/acl).
The AUTH command authenticates the current connection using the [Valkey ACL system](../topics/acl.md).

The standard way to `AUTH` is the two-argument form:

AUTH <username> <password>

This authenticates the current connection with one of the users
defined in the ACL list (see `ACL SETUSER` and the official [ACL guide](/topics/acl) for more information).
defined in the ACL list (see `ACL SETUSER` and the official [ACL guide](../topics/acl.md) for more information).

When the single argument form of the command is used, where only the password is specified,
it is assumed that the implicit username is "default".
Expand Down
2 changes: 1 addition & 1 deletion commands/client-caching.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This command controls the tracking of the keys in the next command executed
by the connection, when tracking is enabled in `OPTIN` or `OPTOUT` mode.
Please check the
[client side caching documentation](/topics/client-side-caching) for
[client side caching documentation](../topics/client-side-caching.md) for
background information.

When tracking is enabled Valkey, using the `CLIENT TRACKING` command, it is
Expand Down
2 changes: 1 addition & 1 deletion commands/client-getredir.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This command returns the client ID we are redirecting our
[tracking](/topics/client-side-caching) notifications to. We set a client
[tracking](../topics/client-side-caching.md) notifications to. We set a client
to redirect to when using `CLIENT TRACKING` to enable tracking. However in
order to avoid forcing client libraries implementations to remember the
ID notifications are redirected to, this command exists in order to improve
Expand Down
2 changes: 1 addition & 1 deletion commands/client-kill.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ instead of killing just by address. The following filters are available:
* `CLIENT KILL LADDR ip:port`. Kill all clients connected to specified local (bind) address.
* `CLIENT KILL ID client-id`. Allows to kill a client by its unique `ID` field. Client `ID`'s are retrieved using the `CLIENT LIST` command.
* `CLIENT KILL TYPE type`, where *type* is one of `normal`, `master`, `replica` and `pubsub`. This closes the connections of **all the clients** in the specified class. Note that clients blocked into the `MONITOR` command are considered to belong to the `normal` class.
* `CLIENT KILL USER username`. Closes all the connections that are authenticated with the specified [ACL](/topics/acl) username, however it returns an error if the username does not map to an existing ACL user.
* `CLIENT KILL USER username`. Closes all the connections that are authenticated with the specified [ACL](../topics/acl.md) username, however it returns an error if the username does not map to an existing ACL user.
* `CLIENT KILL SKIPME yes/no`. By default this option is set to `yes`, that is, the client calling the command will not get killed, however setting this option to `no` will have the effect of also killing the client calling the command.
* `CLIENT KILL MAXAGE maxage`. Closes all the connections that are older than the specified age, in seconds.

Expand Down
4 changes: 2 additions & 2 deletions commands/client-no-evict.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The `CLIENT NO-EVICT` command sets the [client eviction](/topics/clients#client-eviction) mode for the current connection.
The `CLIENT NO-EVICT` command sets the [client eviction](../topics/clients.md#client-eviction) mode for the current connection.

When turned on and client eviction is configured, the current connection will be excluded from the client eviction process even if we're above the configured client eviction threshold.

When turned off, the current client will be re-included in the pool of potential clients to be evicted (and evicted if needed).

See [client eviction](/topics/clients#client-eviction) for more details.
See [client eviction](../topics/clients.md#client-eviction) for more details.
4 changes: 2 additions & 2 deletions commands/client-tracking.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This command enables the tracking feature of the Valkey server, that is used
for [server assisted client side caching](/topics/client-side-caching).
for [server assisted client side caching](../topics/client-side-caching.md).

When tracking is enabled Valkey remembers the keys that the connection
requested, in order to send later invalidation messages when such keys are
Expand All @@ -9,7 +9,7 @@ when the RESP3 protocol is used) or redirected in a different connection
available where clients participating in this protocol receive every
notification just subscribing to given key prefixes, regardless of the
keys that they requested. Given the complexity of the argument please
refer to [the main client side caching documentation](/topics/client-side-caching) for the details. This manual page is only a reference for the options of this subcommand.
refer to [the main client side caching documentation](../topics/client-side-caching.md) for the details. This manual page is only a reference for the options of this subcommand.

In order to enable tracking, use:

Expand Down
2 changes: 1 addition & 1 deletion commands/client-trackinginfo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The command returns information about the current client connection's use of the [server assisted client side caching](/topics/client-side-caching) feature.
The command returns information about the current client connection's use of the [server assisted client side caching](../topics/client-side-caching.md) feature.

Here's the list of tracking information sections and their respective values:

Expand Down
6 changes: 3 additions & 3 deletions commands/cluster-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ Here are the explanation of these fields:
* `cluster_stats_messages_pong_sent` and `cluster_stats_messages_pong_received`: PONG (reply to PING).
* `cluster_stats_messages_meet_sent` and `cluster_stats_messages_meet_received`: Handshake message sent to a new node, either through gossip or `CLUSTER MEET`.
* `cluster_stats_messages_fail_sent` and `cluster_stats_messages_fail_received`: Mark node xxx as failing.
* `cluster_stats_messages_publish_sent` and `cluster_stats_messages_publish_received`: Pub/Sub Publish propagation, see [Pubsub](/topics/pubsub#pubsub).
* `cluster_stats_messages_publish_sent` and `cluster_stats_messages_publish_received`: Pub/Sub Publish propagation, see [Pubsub](../topics/pubsub.md#pubsub).
* `cluster_stats_messages_auth-req_sent` and `cluster_stats_messages_auth-req_received`: Replica initiated leader election to replace its master.
* `cluster_stats_messages_auth-ack_sent` and `cluster_stats_messages_auth-ack_received`: Message indicating a vote during leader election.
* `cluster_stats_messages_update_sent` and `cluster_stats_messages_update_received`: Another node slots configuration.
* `cluster_stats_messages_mfstart_sent` and `cluster_stats_messages_mfstart_received`: Pause clients for manual failover.
* `cluster_stats_messages_module_sent` and `cluster_stats_messages_module_received`: Module cluster API message.
* `cluster_stats_messages_publishshard_sent` and `cluster_stats_messages_publishshard_received`: Pub/Sub Publish shard propagation, see [Sharded Pubsub](/topics/pubsub#sharded-pubsub).
* `cluster_stats_messages_publishshard_sent` and `cluster_stats_messages_publishshard_received`: Pub/Sub Publish shard propagation, see [Sharded Pubsub](../topics/pubsub.md#sharded-pubsub).

More information about the Current Epoch and Config Epoch variables are available in the [Valkey Cluster specification document](/topics/cluster-spec#cluster-current-epoch).
More information about the Current Epoch and Config Epoch variables are available in the [Valkey Cluster specification document](../topics/cluster-spec.md#cluster-current-epoch).
2 changes: 1 addition & 1 deletion commands/command-getkeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Returns @array-reply of keys from a full Valkey command.
`COMMAND GETKEYS` is a helper command to let you find the keys
from a full Valkey command.

`COMMAND` provides information on how to find the key names of each command (see `firstkey`, [key specifications](/topics/key-specs#logical-operation-flags), and `movablekeys`),
`COMMAND` provides information on how to find the key names of each command (see `firstkey`, [key specifications](../topics/key-specs.md#logical-operation-flags), and `movablekeys`),
but in some cases it's not possible to find keys of certain commands and then the entire command must be parsed to discover some / all key names.
You can use `COMMAND GETKEYS` or `COMMAND GETKEYSANDFLAGS` to discover key names directly from how Valkey parses the commands.

Expand Down
4 changes: 2 additions & 2 deletions commands/command-getkeysandflags.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ Returns @array-reply of keys from a full Valkey command and their usage flags.

`COMMAND GETKEYSANDFLAGS` is a helper command to let you find the keys from a full Valkey command together with flags indicating what each key is used for.

`COMMAND` provides information on how to find the key names of each command (see `firstkey`, [key specifications](/topics/key-specs#logical-operation-flags), and `movablekeys`),
`COMMAND` provides information on how to find the key names of each command (see `firstkey`, [key specifications](../topics/key-specs.md#logical-operation-flags), and `movablekeys`),
but in some cases it's not possible to find keys of certain commands and then the entire command must be parsed to discover some / all key names.
You can use `COMMAND GETKEYS` or `COMMAND GETKEYSANDFLAGS` to discover key names directly from how Valkey parses the commands.

Refer to [key specifications](/topics/key-specs#logical-operation-flags) for information about the meaning of the key flags.
Refer to [key specifications](../topics/key-specs.md#logical-operation-flags) for information about the meaning of the key flags.

@examples

Expand Down
2 changes: 1 addition & 1 deletion commands/command-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Return an array of the server's command names.
You can use the optional _FILTERBY_ modifier to apply one of the following filters:

- **MODULE module-name**: get the commands that belong to the module specified by _module-name_.
- **ACLCAT category**: get the commands in the [ACL category](/docs/management/security/acl/#command-categories) specified by _category_.
- **ACLCAT category**: get the commands in the [ACL category](../topics/acl.md#command-categories) specified by _category_.
- **PATTERN pattern**: get the commands that match the given glob-like _pattern_.
6 changes: 3 additions & 3 deletions commands/command.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ Command flags are an array. It can contain the following simple strings (status
* **no_auth:** executing the command doesn't require authentication.
* **no_async_loading:** the command is denied during asynchronous loading (that is when a replica uses disk-less `SWAPDB SYNC`, and allows access to the old dataset).
* **no_mandatory_keys:** the command may accept key name arguments, but these aren't mandatory.
* **no_multi:** the command isn't allowed inside the context of a [transaction](/topics/transactions).
* **noscript:** the command can't be called from [scripts](/topics/eval-intro) or [functions](/topics/functions-intro).
* **pubsub:** the command is related to [Valkey Pub/Sub](/topics/pubsub).
* **no_multi:** the command isn't allowed inside the context of a [transaction](../topics/transactions.md).
* **noscript:** the command can't be called from [scripts](../topics/eval-intro.md) or [functions](../topics/functions-intro.md).
* **pubsub:** the command is related to [Valkey Pub/Sub](../topics/pubsub.md).
* **random**: the command returns random results, which is a concern with verbatim script replication. This flag is a [command tip][tb].
* **readonly:** the command doesn't modify data.
* **sort_for_script:** the command's output is sorted when called from a script.
Expand Down
6 changes: 3 additions & 3 deletions commands/eval.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Invoke the execution of a server-side Lua script.

The first argument is the script's source code.
Scripts are written in [Lua](https://lua.org) and executed by the embedded [Lua 5.1](/topics/lua-api) interpreter in Valkey.
Scripts are written in [Lua](https://lua.org) and executed by the embedded [Lua 5.1](../topics/lua-api.md) interpreter in Valkey.

The second argument is the number of input key name arguments, followed by all the keys accessed by the script.
These names of input keys are available to the script as the [_KEYS_ global runtime variable](/topics/lua-api#the-keys-global-variable)
These names of input keys are available to the script as the [_KEYS_ global runtime variable](../topics/lua-api.md#the-keys-global-variable)
Any additional input arguments **should not** represent names of keys.

**Important:**
Expand All @@ -18,7 +18,7 @@ These are added to the Lua interpreter and cached to redis-server, consuming a l
Starting from Valkey 8.0, scripts loaded with `EVAL` or `EVAL_RO` will be deleted from redis after a certain number (least recently used order).
The number of evicted scripts can be viewed through `INFO`'s `evicted_scripts`.

Please refer to the [Valkey Programmability](/topics/programmability) and [Introduction to Eval Scripts](/topics/eval-intro) for more information about Lua scripts.
Please refer to the [Valkey Programmability](../topics/programmability.md) and [Introduction to Eval Scripts](../topics/eval-intro.md) for more information about Lua scripts.

@examples

Expand Down
4 changes: 2 additions & 2 deletions commands/eval_ro.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
This is a read-only variant of the `EVAL` command that cannot execute commands that modify data.

For more information about when to use this command vs `EVAL`, please refer to [Read-only scripts](/docs/manual/programmability/#read-only-scripts).
For more information about when to use this command vs `EVAL`, please refer to [Read-only scripts](../topics/programmability.md#read-only-scripts).

For more information about `EVAL` scripts please refer to [Introduction to Eval Scripts](/topics/eval-intro).
For more information about `EVAL` scripts please refer to [Introduction to Eval Scripts](../topics/eval-intro.md).

@examples

Expand Down
2 changes: 1 addition & 1 deletion commands/evalsha.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Evaluate a script from the server's cache by its SHA1 digest.
The server caches scripts by using the `SCRIPT LOAD` command.
The command is otherwise identical to `EVAL`.

Please refer to the [Valkey Programmability](/topics/programmability) and [Introduction to Eval Scripts](/topics/eval-intro) for more information about Lua scripts.
Please refer to the [Valkey Programmability](../topics/programmability.md) and [Introduction to Eval Scripts](../topics/eval-intro.md) for more information about Lua scripts.
Loading

0 comments on commit baffe05

Please sign in to comment.