]> Entropealabs - cluster_kv.git/commitdiff
initial wildcard support, it ain't pretty...
authorChristopher <chris@entropealabs.com>
Sat, 7 Mar 2020 22:11:47 +0000 (16:11 -0600)
committerChristopher <chris@entropealabs.com>
Sat, 7 Mar 2020 22:11:47 +0000 (16:11 -0600)
lib/cluster_kv/ring.ex

index 0cbdb34389ca0fb31e16e1fb45e13b1b48acdd41..dfc1420f05d3044e668de9c586f4451238227968 100644 (file)
@@ -241,6 +241,7 @@ defmodule ClusterKV.Ring do
         %SL{data: %Ring{name: n, db: db}} = sl
       ) do
     vals = DB.get(db, key)
+    Logger.info("Got Wildcard Value: #{inspect(vals)}")
 
     vals =
       case vals do
@@ -258,6 +259,8 @@ defmodule ClusterKV.Ring do
             end
 
           Enum.filter(vals, fn {p, _val} ->
+            Logger.info("Checking wilcard vals #{inspect(p)} against #{inspect(parts)}")
+
             Enum.all?(parts, fn {k, i} ->
               case Enum.at(p, i) do
                 ^k -> true