View Source Pigeon.Configurable protocol (Pigeon v1.6.3)
Summary
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec max_demand(any()) :: non_neg_integer()
Schedules connection ping if necessary.
Examples
iex> schedule_ping(%Pigeon.APNS.Config{ping_period: 2})
iex> receive do
...> :ping -> "Got ping!"
...> after
...> 5000 -> "No ping received."
...> end
"Got ping!"
iex> schedule_ping(%Pigeon.FCM.Config{})
iex> receive do
...> :ping -> "Got ping!"
...> after
...> 5000 -> "No ping received."
...> end
"No ping received."
Returns worker name for config.
Examples
iex> worker_name(%Pigeon.APNS.Config{name: :test})
:test
iex> worker_name(%Pigeon.FCM.Config{name: :another})
:another