dragonfly

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 4 Imported by: ? 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 dragonfly provides a Dragonfly-backed cache store through its Redis protocol.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilClient = rediscache.ErrNilClient
	ErrNilCodec  = rediscache.ErrNilCodec
)

Functions

This section is empty.

Types

type InvalidationBus

type InvalidationBus[K comparable] struct {
	*rediscache.InvalidationBus[K]
}

InvalidationBus distributes events through Dragonfly's Redis-compatible Pub/Sub.

func NewInvalidationBus

func NewInvalidationBus[K comparable](client goredis.UniversalClient, options ...InvalidationOption[K]) (*InvalidationBus[K], error)

NewInvalidationBus constructs a Dragonfly invalidation bus.

type InvalidationOption

type InvalidationOption[K comparable] func(*invalidationConfig[K]) error

InvalidationOption configures Dragonfly invalidation serialization.

func WithInvalidationKeyCodec

func WithInvalidationKeyCodec[K comparable](codec cache.Codec[K]) InvalidationOption[K]

WithInvalidationKeyCodec overrides automatic invalidation-key serialization.

type Locker

type Locker[K comparable] struct {
	*rediscache.Locker[K]
}

Locker provides renewable Dragonfly leases through Redis-compatible scripts.

func NewLocker

func NewLocker[K comparable](client goredis.UniversalClient, options ...LockerOption[K]) (*Locker[K], error)

NewLocker constructs a Dragonfly locker using a caller-owned Redis client.

type LockerOption

type LockerOption[K comparable] func(*lockerConfig[K]) error

LockerOption configures Dragonfly lock key serialization.

func WithLockerKeyCodec

func WithLockerKeyCodec[K comparable](codec cache.Codec[K]) LockerOption[K]

WithLockerKeyCodec overrides automatic lock key serialization.

type Option

type Option[K comparable, V any] func(*config[K, V]) error

Option configures Dragonfly serialization.

func WithKeyCodec

func WithKeyCodec[K comparable, V any](codec cache.Codec[K]) Option[K, V]

WithKeyCodec overrides automatic key serialization.

func WithValueCodec

func WithValueCodec[K comparable, V any](codec cache.Codec[V]) Option[K, V]

WithValueCodec overrides automatic value serialization.

type Store

type Store[K comparable, V any] struct {
	*rediscache.Store[K, V]
}

Store is a Dragonfly cache store using Redis-compatible commands.

func New

func New[K comparable, V any](client goredis.UniversalClient, options ...Option[K, V]) (*Store[K, V], error)

New constructs a Dragonfly store using a caller-owned Redis client.

Jump to

Keyboard shortcuts

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