Documentation
¶
Index ¶
- type Option
- func WithClientName(name string) Option
- func WithConnMaxIdleTime(connMaxIdleTime time.Duration) Option
- func WithConnMaxLifetime(connMaxLifetime time.Duration) Option
- func WithConnectRetryBackoff(initial time.Duration, max time.Duration) Option
- func WithConnectRetryTimeout(timeout time.Duration) Option
- func WithContextTimeoutEnabled(enabled bool) Option
- func WithDialTimeout(dialTimeout time.Duration) Option
- func WithLogger(logger *slog.Logger) Option
- func WithMaxActiveConns(maxActiveConns int) Option
- func WithMaxIdleConns(maxIdleConns int) Option
- func WithMaxRetries(maxRetries int) Option
- func WithMaxRetryBackoff(maxRetryBackoff time.Duration) Option
- func WithMinIdleConns(minIdleConns int) Option
- func WithMinRetryBackoff(minRetryBackoff time.Duration) Option
- func WithPassword(password string) Option
- func WithPoolSize(poolSize int) Option
- func WithPoolTimeout(poolTimeout time.Duration) Option
- func WithReadTimeout(readTimeout time.Duration) Option
- func WithUserName(username string) Option
- func WithWriteTimeout(writeTimeout time.Duration) Option
- type Wrapper
- func (w *Wrapper) AllowRateLimit(ctx context.Context, key string, interval time.Duration, burst int, ...) (bool, error)
- func (w *Wrapper) Get(ctx context.Context, key string) (string, bool, error)
- func (w *Wrapper) Invalidate(ctx context.Context, key string) error
- func (w *Wrapper) Ping(ctx context.Context) error
- func (w *Wrapper) Set(ctx context.Context, key string, value string, ttl time.Duration) error
- func (w *Wrapper) SetIfAbsent(ctx context.Context, key string, value string, ttl time.Duration) (bool, error)
- func (w *Wrapper) Shutdown(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
func WithClientName ¶
func WithConnMaxIdleTime ¶
func WithConnMaxLifetime ¶
func WithConnectRetryBackoff ¶
func WithConnectRetryTimeout ¶
func WithDialTimeout ¶
func WithLogger ¶
func WithMaxActiveConns ¶
func WithMaxIdleConns ¶
func WithMaxRetries ¶
func WithMaxRetryBackoff ¶
func WithMinIdleConns ¶
func WithMinRetryBackoff ¶
func WithPassword ¶
func WithPoolSize ¶
func WithPoolTimeout ¶
func WithReadTimeout ¶
func WithUserName ¶
func WithWriteTimeout ¶
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
func (*Wrapper) AllowRateLimit ¶
func (*Wrapper) SetIfAbsent ¶
Click to show internal directories.
Click to hide internal directories.