Current section

9 Versions

Jump to

Compare versions

4 files changed
+13 additions
-6 deletions
  @@ -1,6 +1,12 @@
1 1 # Changelog for ConnGRPC
2 2
3 3
4 + ## v0.4.3
5 +
6 + ### Fix
7 +
8 + - Add missing return value to `@spec` of `ConnGRPC.Pool.get_channel/1`
9 +
4 10 ## v0.4.2
5 11
6 12 ### Fix
  @@ -1,6 +1,6 @@
1 1 {<<"links">>,[{<<"GitHub">>,<<"https://github.com/TheRealReal/conn_grpc">>}]}.
2 2 {<<"name">>,<<"conn_grpc">>}.
3 - {<<"version">>,<<"0.4.2">>}.
3 + {<<"version">>,<<"0.4.3">>}.
4 4 {<<"description">>,
5 5 <<"Persistent channels, and channel pools for gRPC Elixir">>}.
6 6 {<<"elixir">>,<<"~> 1.12">>}.
  @@ -115,7 +115,8 @@ defmodule ConnGRPC.Pool do
115 115 defmacro __using__(use_opts \\ []) do
116 116 quote do
117 117 @doc "Returns a gRPC channel from the pool"
118 - @spec get_channel() :: {:ok, GRPC.Channel.t()} | {:error, :not_connected}
118 + @spec get_channel() ::
119 + {:ok, GRPC.Channel.t()} | {:error, :not_connected} | {:error, :not_started}
119 120 def get_channel, do: ConnGRPC.Pool.get_channel(__MODULE__)
120 121
121 122 @doc "Returns a gRPC channel from the pool, raising on error"
  @@ -163,11 +164,11 @@ defmodule ConnGRPC.Pool do
163 164 end
164 165
165 166 @doc "Returns a gRPC channel from the pool"
166 - @spec get_channel(module | atom) :: {:ok, GRPC.Channel.t()} | {:error, :not_connected}
167 + @spec get_channel(module | atom) ::
168 + {:ok, GRPC.Channel.t()} | {:error, :not_connected} | {:error, :not_started}
167 169 def get_channel(pool_name) do
168 - start = System.monotonic_time()
169 -
170 170 if registry_alive?(pool_name) do
171 + start = System.monotonic_time()
171 172 channels = Registry.lookup(registry(pool_name), :channels)
172 173 pool_size = length(channels)
  @@ -2,7 +2,7 @@ defmodule ConnGRPC.MixProject do
2 2 use Mix.Project
3 3
4 4 @source_url "https://github.com/TheRealReal/conn_grpc"
5 - @version "0.4.2"
5 + @version "0.4.3"
6 6
7 7 def project do
8 8 [