valkeyclient

package
v5.63.9 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package valkeyclient builds the Valkey clients muster's stores share: the aggregator's session auth and capability stores and the OAuth server's DPoP replay cache. The OAuth server's token store applies the same bound through mcp-oauth's own OperationTimeout.

Every command runs under OperationTimeout. Without it a command waits as long as its caller's context lives: valkey-go retries a read with backoff while the connection is down, and on a request context that is the whole request. An authenticated request mirrors its login token and touches the session stores before it is served, so a Valkey that restarts would hold every request -- `initialize` included -- until Valkey answered again.

A command that fails to reach Valkey also fails the commands after it at once for a short while: a request sends several in a row, and without that their timeouts would add up. Bounded, a request answers without what Valkey would have added, or fails fast where it cannot do without Valkey.

Index

Constants

View Source
const (
	// OperationTimeout bounds every Valkey command muster sends, layered on
	// the caller's context (the shorter wins), and the dial and response wait
	// of each connection. A Valkey in the same cluster answers in about a
	// millisecond.
	OperationTimeout = 300 * time.Millisecond
)

Variables

View Source
var ErrUnavailable = errors.New("valkey unavailable: an earlier command did not reach it")

ErrUnavailable is the error of a command that was not sent because an earlier one failed to reach Valkey within the last unavailableFor.

Functions

func New

New creates a client for cfg. The client dials on creation, so an unreachable Valkey is an error here. The stores never read through valkey-go's client-side cache (no DoCache), so the cache and the CLIENT TRACKING subscription it opens per connection are off.

Types

This section is empty.

Jump to

Keyboard shortcuts

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