View Source Redix.URI (Redix v1.5.1)
This module provides functions to work with a Redis URI.
This is generally intended for library developers using Redix under the hood.
Summary
Functions
Returns start options from a Redis URI.
Functions
Returns start options from a Redis URI.
A Redis URI looks like this:
redis://[username:password@]host[:port][/db]
Valkey
URIs also work with Valkey, a Redis-compatible in-memory key-value store. Use
valkey://
as the scheme instead ofredis://
.
Examples
iex> Redix.URI.to_start_options("redis://example.com")
[host: "example.com"]
iex> Redix.URI.to_start_options("rediss://username:password@example.com:5000/3")
[ssl: true, database: 3, password: "password", username: "username", port: 5000, host: "example.com"]