Hi everyone,
The Registry module has put_meta/3 to store registry metadata but once used to store a key/value there doesn't seem to be a way of removing the key (and its data).
iex(1)> Registry.start_link(keys: :unique, name: Registry.PutMetaTest)
{:ok, #PID<0.112.0>}
iex(2)> Registry.put_meta(Registry.PutMetaTest, :custom_key, "custom_value")
:ok
iex(3)> Registry.meta(Registry.PutMetaTest, :custom_key)
{:ok, "custom_value"}
I don't think there currently is a way of removing :custom_key and its value:
iex(4)> Registry.unregister(Registry.PutMetaTest, :custom_key)
:ok
iex(5)> Registry.meta(Registry.PutMetaTest, :custom_key)
{:ok, "custom_value"}
iex(6)> Registry.unregister_match(Registry.PutMetaTest, :custom_key, "custom_value")
:ok
iex(7)> Registry.meta(Registry.PutMetaTest, :custom_key)
{:ok, "custom_value"}
What would you think about adding `Registry.unregister_meta/2` (to stay consistent with unregister/2 and unregister_match/4)?
Thanks!