Documentation
¶
Index ¶
- Constants
- type Mode
- type RedisConnection
- func (rc *RedisConnection) BuildTLSConfig(caCertPath, clientCertPath, clientKeyPath *string) (*tls.Config, error)
- func (rc *RedisConnection) Close() error
- func (rc *RedisConnection) Connect(ctx context.Context) error
- func (rc *RedisConnection) GetClient(ctx context.Context) (redis.UniversalClient, error)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisConnection ¶
type RedisConnection struct {
Mode Mode
Address []string
DB int
MasterName string
Password string
Protocol int
UseTLS bool
Logger log.Logger
Connected bool
Client redis.UniversalClient
CACertPath *string
ClientCertPath *string
ClientKeyPath *string
UseIAMAuth bool
ServiceAccountName string
TokenLifeTime time.Duration
RefreshDuration time.Duration
// contains filtered or unexported fields
}
RedisConnection represents a Redis connection hub
func (*RedisConnection) BuildTLSConfig ¶ added in v1.17.0
func (rc *RedisConnection) BuildTLSConfig(caCertPath, clientCertPath, clientKeyPath *string) (*tls.Config, error)
BuildTLSConfig generates a *tls.Config configuration #nosec G304
func (*RedisConnection) Close ¶ added in v1.12.1
func (rc *RedisConnection) Close() error
Close closes the Redis connection
Click to show internal directories.
Click to hide internal directories.