peburrows / goth

Elixir package for Oauth authentication via Google Cloud APIs
http://hexdocs.pm/goth
MIT License
289 stars 111 forks source link

Suggestion - Goth.exists?/1 function #157

Open lkarthee opened 1 year ago

lkarthee commented 1 year ago

I am using a dynamic supervisor to spawn goth instances. The Goth instances are synced with db using a GenServer.

I felt an exists?/1 function to be missing.

  def exists?(name) do
   case Registry.lookup(@registry, name) do
      [{_pid,  _}] -> true
      _ -> false
    end
 end 

What are you thoughts on this - Can a PR be sent for this ?