From 451e55921d7c0aaa256c16b126581b56c405abf8 Mon Sep 17 00:00:00 2001 From: Zvonimir Rudinski Date: Thu, 25 Apr 2024 14:06:49 +0200 Subject: [PATCH] Add support for valkey schema (#267) --- lib/redix/uri.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redix/uri.ex b/lib/redix/uri.ex index deabb99..10ad6f5 100644 --- a/lib/redix/uri.ex +++ b/lib/redix/uri.ex @@ -26,8 +26,8 @@ defmodule Redix.URI do def to_start_options(uri) when is_binary(uri) do %URI{host: host, port: port, scheme: scheme} = uri = URI.parse(uri) - unless scheme in ["redis", "rediss"] do - raise ArgumentError, "expected scheme to be redis:// or rediss://, got: #{scheme}://" + unless scheme in ["redis", "rediss", "valkey"] do + raise ArgumentError, "expected scheme to be redis://, valkey:// or rediss://, got: #{scheme}://" end {username, password} = username_and_password(uri)