Kvasir.Source behaviour (kvasir v0.0.8) View Source
Link to this section Summary
Link to this section Callbacks
Specs
Specs
commit(name :: atom(), Kvasir.Topic.t(), Kvasir.Event.t()) :: {:ok, Kvasir.Event.t()} | {:error, atom()}
Specs
contains?(name :: atom(), Kvasir.topic(), Kvasir.Offset.t()) :: :maybe | true | false
Specs
generate_dedicated_publisher( name :: atom(), target :: module(), Kvasir.Topic.t() ) :: :ok | {:error, atom()}
Specs
listen( name :: atom(), Kvasir.topic(), callback :: (Kvasir.Event.t() -> :ok | {:error, reason :: atom()}), opts :: Kvasir.EventSource.stream_opts() ) :: :ok | {:error, atom()}
Specs
stream(name :: atom(), Kvasir.topic(), opts :: Kvasir.EventSource.stream_opts()) :: {:ok, Stream.t()} | {:error, atom()}
Specs
subscribe( name :: atom(), Kvasir.topic(), opts :: Kvasir.EventSource.stream_opts() ) :: {:ok, pid()} | {:error, atom()}