Documentation ¶
Overview ¶
Package redis provides implementation of Go API for redis interface
Index ¶
- Variables
- type Cmder
- type Conn
- type Connector
- type Deleter
- type Getter
- type Hook
- type IntCmd
- type Lister
- type Option
- func WithAddrs(addrs ...string) Option
- func WithClusterSlots(f func() ([]redis.ClusterSlot, error)) Option
- func WithDB(db int) Option
- func WithDialTimeout(dur string) Option
- func WithDialer(der tcp.Dialer) Option
- func WithDialerFunc(der func(ctx context.Context, addr, port string) (net.Conn, error)) Option
- func WithHooks(hooks ...Hook) Option
- func WithIdleCheckFrequency(dur string) Option
- func WithIdleTimeout(dur string) Option
- func WithInitialPingDuration(dur string) Option
- func WithInitialPingTimeLimit(lim string) Option
- func WithKeyPrefix(prefix string) Option
- func WithMaximumConnectionAge(dur string) Option
- func WithMaximumRetryBackoff(dur string) Option
- func WithMinimumIdleConnection(minIdleConns int) Option
- func WithMinimumRetryBackoff(dur string) Option
- func WithOnConnectFunction(f func(*redis.Conn) error) Option
- func WithOnNewNodeFunction(f func(*redis.Client)) Option
- func WithPassword(password string) Option
- func WithPoolSize(poolSize int) Option
- func WithPoolTimeout(dur string) Option
- func WithReadOnlyFlag(readOnly bool) Option
- func WithReadTimeout(dur string) Option
- func WithRedirectLimit(maxRedirects int) Option
- func WithRetryLimit(maxRetries int) Option
- func WithRouteByLatencyFlag(routeByLatency bool) Option
- func WithRouteRandomlyFlag(routeRandomly bool) Option
- func WithTLSConfig(cfg *tls.Config) Option
- func WithWriteTimeout(dur string) Option
- type Redis
- type Setter
- type StatusCmd
- type StringCmd
Constants ¶
This section is empty.
Variables ¶
var ( // Nil is a type alias of redis.Nil. Nil = redis.Nil )
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*redisClient) error
Option represents the functional option for redisClient.
func WithClusterSlots ¶
func WithClusterSlots(f func() ([]redis.ClusterSlot, error)) Option
WithClusterSlots returns the option to set the clusterSlots.
func WithDialTimeout ¶
WithDialTimeout returns the option to set the dialTimeout.
func WithDialer ¶
WithDialer returns the option to set the dialer.
func WithDialerFunc ¶ added in v0.0.51
WithDialerFunc returns the option to set the dialer func.
func WithIdleCheckFrequency ¶
WithIdleCheckFrequency returns the option to set the idleCheckFrequency.
func WithIdleTimeout ¶
WithIdleTimeout returns the option to set the idleTimeout.
func WithInitialPingDuration ¶
WithInitialPingDuration returns the option to set the initialPingDuration.
func WithInitialPingTimeLimit ¶
WithInitialPingTimeLimit returns the option to set the initialPingTimeLimit.
func WithKeyPrefix ¶
WithKeyPrefix returns the option to set the keyPref.
func WithMaximumConnectionAge ¶
WithMaximumConnectionAge returns the option to set the maxConnAge.
func WithMaximumRetryBackoff ¶
WithMaximumRetryBackoff returns the option to set the maxRetryBackoff.
func WithMinimumIdleConnection ¶
WithMinimumIdleConnection returns the option to set the minIdleConns.
func WithMinimumRetryBackoff ¶
WithMinimumRetryBackoff returns the option to set the minRetryBackoff.
func WithOnConnectFunction ¶
WithOnConnectFunction returns the option to set the onConnect.
func WithOnNewNodeFunction ¶
WithOnNewNodeFunction returns the option to set the onNewNode.
func WithPassword ¶
WithPassword returns the option to set the password.
func WithPoolSize ¶
WithPoolSize returns the option to set the poolSize.
func WithPoolTimeout ¶
WithPoolTimeout returns the option to set the poolTimeout.
func WithReadOnlyFlag ¶
WithReadOnlyFlag returns the option to set the readOnly.
func WithReadTimeout ¶
WithReadTimeout returns the option to set the readTimeout.
func WithRedirectLimit ¶
WithRedirectLimit returns the option to set the maxRedirects.
func WithRetryLimit ¶
WithRetryLimit returns the option to set the maxRetries.
func WithRouteByLatencyFlag ¶
WithRouteByLatencyFlag returns the option to set the routeByLatency.
func WithRouteRandomlyFlag ¶
WithRouteRandomlyFlag returns the option to set the routeRandomly.
func WithTLSConfig ¶
WithTLSConfig returns the option to set the tlsConfig.
func WithWriteTimeout ¶
WithWriteTimeout returns the option to set the writeTimeout.