kane v1.0.0 Kane.Subscription

Link to this section Summary

Functions

Find a subscription by name. The name can be either a short name (my-subscription) or the fully-qualified name (projects/my-project/subscriptions/my-subscription)

Link to this section Types

Link to this type

t()
t() :: %Kane.Subscription{
  ack_deadline: term(),
  filter: term(),
  name: String.t(),
  topic: term()
}

Link to this section Functions

Link to this function

ack(kane, sub, message)
ack(Kane.t(), t(), messages :: Kane.Message.t() | [Kane.Message.t()]) ::
  :ok | Kane.Client.error()

Link to this function

create(kane, sub)
create(Kane.t(), t()) ::
  {:ok, t()} | {:error, :already_exists} | Kane.Client.error()

Link to this function

delete(kane, sub_name)
delete(kane :: Kane.t(), subscription :: t() | String.t()) ::
  Kane.Client.success() | Kane.Client.error()

Link to this function

extend(kane, sub, msg, extension)
extend(
  Kane.t(),
  t(),
  messages :: Kane.Message.t() | [Kane.Message.t()],
  extension :: pos_integer()
) :: :ok | Kane.Client.error()

Link to this function

find(kane, name)
find(Kane.t(), String.t()) :: {:ok, t()} | Kane.Client.error()

Find a subscription by name. The name can be either a short name (my-subscription) or the fully-qualified name (projects/my-project/subscriptions/my-subscription)

Link to this function

full_name(sub_name, project_id)
full_name(subscription :: t() | String.t(), String.t()) :: String.t()

Link to this function

pull(kane, sub, options \\ [])
pull(Kane.t(), t(), Keyword.t() | pos_integer()) ::
  {:ok, [Kane.Message.t()]} | Kane.Client.error()

Link to this function

stream(kane, sub, options \\ [])
stream(Kane.t(), t(), Keyword.t() | pos_integer()) :: Enumerable.t()

Link to this function

strip!(project_id, name)
strip!(project_id :: String.t(), name :: String.t()) :: String.t()