rediscluster

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2025 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package rediscluster provides configuration options and utilities for Redis Cluster backend implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyOptions

func ApplyOptions(opt *redis.ClusterOptions, options ...Option)

ApplyOptions applies a list of options to the provided ClusterOptions.

Types

type Option

type Option func(*redis.ClusterOptions)

Option is a function type that can be used to configure the redis ClusterClient Options.

func WithAddrs

func WithAddrs(addrs ...string) Option

WithAddrs sets the Addrs for cluster nodes.

func WithMaxRetries

func WithMaxRetries(maxRetries int) Option

WithMaxRetries sets MaxRetries.

func WithMinIdleConns

func WithMinIdleConns(minIdle int) Option

WithMinIdleConns sets MinIdleConns.

func WithPassword

func WithPassword(password string) Option

WithPassword sets Password.

func WithPoolSize

func WithPoolSize(size int) Option

WithPoolSize sets PoolSize.

func WithPoolTimeout

func WithPoolTimeout(d time.Duration) Option

WithPoolTimeout sets PoolTimeout.

func WithReadTimeout

func WithReadTimeout(readTimeout time.Duration) Option

WithReadTimeout sets ReadTimeout.

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) Option

WithTLSConfig sets TLSConfig.

func WithUsername

func WithUsername(username string) Option

WithUsername sets Username.

func WithWriteTimeout

func WithWriteTimeout(writeTimeout time.Duration) Option

WithWriteTimeout sets WriteTimeout.

type Store

type Store struct {
	Client *redis.ClusterClient
}

Store is a redis cluster store instance with a ClusterClient.

func New

func New(opts ...Option) (*Store, error)

New creates a redis cluster store instance with given options.

Jump to

Keyboard shortcuts

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