Documentation
¶
Overview ¶
Package valkey is the valkey/redis key-value plugin. Scripts import it as scriptling.valkey:
import scriptling.valkey as valkey
client = valkey.connect("valkey://localhost:6379")
client.set("greeting", "hello", ttl_seconds=60)
print(client.get("greeting"))
client.close()
URLs accept the schemes valkey://, redis:// and tcp:// (plaintext) and valkeys://, rediss:// (TLS), with optional user:pass@ and a /db path, and take one address or a comma-separated seed list for clusters and sentinels. Every address must pass the host's network policy. The API is mirrored exactly by the badgerdb plugin, so scripts can switch between a shared cache and local storage unchanged. The same library serves external plugin mode (plugins/valkey/cmd) and compiled-in registration (build tag plugin_valkey).
Index ¶
Constants ¶
const ConnectSource = `` /* 139-byte string literal not displayed */
ConnectSource is the scriptling-source wrapper for connect() in external plugin mode, where a Go function cannot return an instance over the wire: it constructs the Client class through the plugin object protocol.
const Description = "Valkey and Redis key-value client"
Description is the plugin metadata description.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.