Skip to content

Commit

Permalink
Improve Redis documentation header
Browse files Browse the repository at this point in the history
  • Loading branch information
wilzbach committed Jul 18, 2017
1 parent 20160dd commit a418616
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion redis/vibe/db/redis/redis.d
Expand Up @@ -38,10 +38,32 @@ RedisClient connectRedis(string host, ushort port = RedisClient.defaultPort)
}

/**
Returns a Redis database connecction instance corresponding to the given URL.
Returns a Redis database connection instance corresponding to the given URL.
The URL must be of the format "redis://server[:port]/dbnum".
Authentication:
Authenticated connections are supported by using a URL connection string
such as "redis://password@host".
Examples:
---
// connecting with default settings:
auto redisDB = connectRedisDB("redis://127.0.0.1");
---
---
// connecting using the URL form with custom settings
auto redisDB = connectRedisDB("redis://password:myremotehost/3?maxmemory=10000000");
---
Params:
url = Redis URI scheme for a Redis database instance
host_or_url = Can either be a host name, in which case the default port will be used, or a URL with the redis:// scheme.
Returns:
A new RedisDatabase instance that can be used to access the database.
See_also: $(LINK2 https://www.iana.org/assignments/uri-schemes/prov/redis, Redis URI scheme)
*/
RedisDatabase connectRedisDB(URL url)
Expand Down

0 comments on commit a418616

Please sign in to comment.