Handle for streaming persistent events with awaitable confirmation.
Unlike KubeMQ.EventStreamHandle, each send/2 call waits for server
confirmation and returns {:ok, %EventStoreResult{}}.
Usage
{:ok, handle} = KubeMQ.Client.send_event_store_stream(client)
{:ok, result} = KubeMQ.EventStoreStreamHandle.send(handle, event_store)
:ok = KubeMQ.EventStoreStreamHandle.close(handle)
Summary
Functions
Returns a specification to start this module under a supervisor.
Close the event store stream handle, terminating the underlying gRPC stream.
Send a persistent event through the streaming handle and await confirmation.
Types
@type t() :: GenServer.server()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(t()) :: :ok
Close the event store stream handle, terminating the underlying gRPC stream.
@spec send(t(), KubeMQ.EventStore.t()) :: {:ok, KubeMQ.EventStoreResult.t()} | {:error, KubeMQ.Error.t()}
Send a persistent event through the streaming handle and await confirmation.
Unlike KubeMQ.EventStreamHandle.send/2, this call waits for the server
to confirm persistence and returns {:ok, %KubeMQ.EventStoreResult{}}.
@spec start_link(keyword()) :: GenServer.on_start()