ExecutionPlane.Family.HTTPGateway behaviour (execution_plane v0.2.0)

Copy Markdown View Source

HTTP unary/incremental lifecycle with explicit demand and cancellation.

Summary

Callbacks

cancel(t, keyword)

@callback cancel(
  ExecutionPlane.ExecutionRef.t(),
  keyword()
) :: :ok | {:error, term()}

demand(t, pos_integer, keyword)

@callback demand(ExecutionPlane.ExecutionRef.t(), pos_integer(), keyword()) ::
  :ok | {:error, term()}

status(t, keyword)

@callback status(
  ExecutionPlane.ExecutionRef.t(),
  keyword()
) :: {:ok, ExecutionPlane.Runtime.Status.t()} | {:error, term()}

stream(t, pid, keyword)

@callback stream(ExecutionPlane.Family.HTTPRequest.t(), pid(), keyword()) ::
  {:ok, ExecutionPlane.ActiveExecution.t()} | {:error, term()}

unary(t, keyword)

@callback unary(
  ExecutionPlane.Family.HTTPRequest.t(),
  keyword()
) :: {:ok, ExecutionPlane.ExecutionResult.t()} | {:error, term()}