Handle for streaming events via a bidirectional gRPC stream.
Obtained via KubeMQ.Client.send_event_stream/1. The GenServer serializes
writes to the underlying stream (mutex equivalent via message queue).
Usage
{:ok, handle} = KubeMQ.Client.send_event_stream(client)
:ok = KubeMQ.EventStreamHandle.send(handle, event)
:ok = KubeMQ.EventStreamHandle.close(handle)
Summary
Functions
Returns a specification to start this module under a supervisor.
Close the event stream handle, terminating the underlying gRPC stream.
Send an event through the streaming handle.
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 stream handle, terminating the underlying gRPC stream.
@spec send(t(), KubeMQ.Event.t()) :: :ok | {:error, KubeMQ.Error.t()}
Send an event through the streaming handle.
The event is written to the underlying bidirectional gRPC stream.
Returns :ok on success or {:error, %KubeMQ.Error{}} on failure.
@spec start_link(keyword()) :: GenServer.on_start()