Documentation ¶
Index ¶
Constants ¶
View Source
const ( // URIScheme is a Redis scheme: https://www.iana.org/assignments/uri-schemes/prov/redis // Teleport always uses Redis connection over TLS. URIScheme = "redis" // URISchemeTLS is a Redis scheme that uses TLS for database connection: https://www.iana.org/assignments/uri-schemes/prov/rediss URISchemeTLS = "rediss" )
View Source
const DefaultPort = "6379"
DefaultPort is the Redis default port.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mode ¶
type Mode string
Mode defines the mode in which Redis is configured. Currently, supported are single and cluster.
type Options ¶
type Options struct { // Mode defines Redis connection mode like cluster or single instance. Mode Mode // address of Redis instance. Address string // port on which Redis expects new connections. Port string }
Options defines Redis connection options.
func ParseRedisAddress ¶
ParseRedisAddress parses a Redis connection string and returns the parsed connection options like address and connection mode. If port is skipped default Redis 6379 is used. Correct inputs:
rediss://redis.example.com:6379?mode=cluster redis://redis.example.com:6379 redis.example.com:6379
Incorrect input:
redis.example.com:6379?mode=cluster
Click to show internal directories.
Click to hide internal directories.