valkey

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 15 Imported by: 0

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

View Source
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.

View Source
const Description = "Valkey and Redis key-value client"

Description is the plugin metadata description.

Variables

This section is empty.

Functions

func Build

func Build(policy plugin.PolicySource) *object.Library

Build returns the scriptling.valkey library. policy is read at call time so an external plugin sees the policy its handshake delivered.

Types

This section is empty.

Directories

Path Synopsis
Command valkey serves the valkey/redis plugin over the Scriptling plugin protocol (stdio JSON-RPC).
Command valkey serves the valkey/redis plugin over the Scriptling plugin protocol (stdio JSON-RPC).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL