docs: add examples and clarify usage for token, distinct_cache, and last_cache commands
parent
88ec6af7a4
commit
85310e1282
|
@ -93,6 +93,8 @@ In the example above, replace the following:
|
||||||
|
|
||||||
Use this simple setup to test the cache functionality for a single tag column. It’s helpful when validating basic behavior or building up incrementally.
|
Use this simple setup to test the cache functionality for a single tag column. It’s helpful when validating basic behavior or building up incrementally.
|
||||||
|
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
influxdb3 create distinct_cache \
|
influxdb3 create distinct_cache \
|
||||||
--database my_test_db \
|
--database my_test_db \
|
||||||
|
@ -105,6 +107,8 @@ influxdb3 create distinct_cache \
|
||||||
|
|
||||||
Use this pattern when you need more control over cache structure and retention. It creates a multilevel cache with resource limits.
|
Use this pattern when you need more control over cache structure and retention. It creates a multilevel cache with resource limits.
|
||||||
|
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
influxdb3 create distinct_cache \
|
influxdb3 create distinct_cache \
|
||||||
--database my_test_db \
|
--database my_test_db \
|
||||||
|
|
|
@ -95,12 +95,12 @@ influxdb3 create last_cache \
|
||||||
my_temp_cache
|
my_temp_cache
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--pytest.mark.skip-->
|
|
||||||
|
|
||||||
## Create a last value cache with multiple keys and values
|
## Create a last value cache with multiple keys and values
|
||||||
|
|
||||||
This example shows how to configure a more complex cache:
|
This example shows how to configure a more complex cache:
|
||||||
|
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
influxdb3 create last_cache \
|
influxdb3 create last_cache \
|
||||||
--database my_test_db \
|
--database my_test_db \
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
The `influxdb3 create token` command creates a new authentication token.
|
The `influxdb3 create token` command creates a new authentication token.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -33,3 +32,21 @@ influxdb3 create token <SUBCOMMAND>
|
||||||
```bash
|
```bash
|
||||||
influxdb3 create token --admin
|
influxdb3 create token --admin
|
||||||
```
|
```
|
||||||
|
|
||||||
|
This returns a token string. You can use it to authenticate future requests by setting it with `--token` or the `INFLUXDB3_AUTH_TOKEN` environment variable.
|
||||||
|
|
||||||
|
### Use the token to create a database
|
||||||
|
|
||||||
|
<!--pytest.mark.skip-->
|
||||||
|
|
||||||
|
```bash
|
||||||
|
influxdb3 create database \
|
||||||
|
--token YOUR_ADMIN_TOKEN \
|
||||||
|
my_new_database
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!Tip]
|
||||||
|
> Set the token as an environment variable to simplify repeated commands:
|
||||||
|
> ```bash
|
||||||
|
> export INFLUXDB3_AUTH_TOKEN=YOUR_ADMIN_TOKEN
|
||||||
|
> ```
|
||||||
|
|
Loading…
Reference in New Issue