redis

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStaleFencingToken = errors.New("fencing/redis: stale fencing token")

ErrStaleFencingToken is returned when a mutation carries a stale token.

Functions

This section is empty.

Types

type Client

type Client interface {
	Eval(ctx context.Context, script string, keys []string, args ...any) (any, error)
}

Client is the minimal Redis surface for fenced writes.

type Resource

type Resource struct {
	Client Client
	Key    string
}

Resource stores a fenced value in Redis.

func (*Resource) Write

func (r *Resource) Write(ctx context.Context, token shiftlock.FencingToken, value string) error

Write mutates only if token is not stale.

Jump to

Keyboard shortcuts

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