cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValkeyConnection

func ValkeyConnection() (valkey.Client, error)

ValkeyConnection func for connect to Valkey server.

func ValkeyConnectionWithConfig added in v1.0.0

func ValkeyConnectionWithConfig(cfg ValkeyConfig, deps ValkeyDeps) (valkey.Client, error)

ValkeyConnectionWithConfig connects using explicit config and dependencies.

Types

type ValkeyConfig added in v1.0.0

type ValkeyConfig struct {
	DBNumber   int
	ClientName string
	Username   string
	Password   string
}

ValkeyConfig defines connection behavior for the shared client.

func ValkeyConfigFromEnv added in v1.0.0

func ValkeyConfigFromEnv() (ValkeyConfig, error)

ValkeyConfigFromEnv reads Valkey client config from environment variables.

type ValkeyDeps added in v1.0.0

type ValkeyDeps struct {
	BuildConnectionURL func(name string) (string, error)
	NewClient          func(opt valkey.ClientOption) (valkey.Client, error)
}

ValkeyDeps defines client bootstrap dependencies to keep setup testable.

func DefaultValkeyDeps added in v1.0.0

func DefaultValkeyDeps() ValkeyDeps

DefaultValkeyDeps returns production defaults for Valkey dependencies.

Jump to

Keyboard shortcuts

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