Backend boundary for Temporal client and worker transport.
Backends own client resources, worker resources, and protocol translation.
They deliver decoded core structs to Temporalex.Server, accept core
completions from it, and execute public client operations for
Temporalex.Client. Backend-specific transport, protobuf, native resources,
and worker handles must stay behind this behaviour.
Summary
Types
Callbacks
@callback cancel_workflow( client_state(), workflow_id :: binary(), run_id :: binary() | nil, opts :: keyword() ) :: :ok | {:error, term()}
@callback complete_activity_task( worker_state(), Temporalex.Core.ActivityCompletion.t() ) :: :ok | {:error, term()}
@callback complete_workflow_activation( worker_state(), Temporalex.Core.Completion.t() ) :: :ok | {:error, term()}
@callback record_activity_heartbeat( worker_state(), task_token :: binary(), details :: term() ) :: :ok | {:error, term()}
@callback shutdown_client(client_state()) :: :ok | {:error, term()}
@callback shutdown_worker(worker_state()) :: :ok | {:error, term()}
@callback start_client(opts :: keyword(), owner_pid :: pid()) :: {:ok, client_state()} | {:error, term()}
@callback start_worker(client_state(), opts :: keyword(), owner_pid :: pid()) :: {:ok, worker_state()} | {:error, term()}
@callback terminate_workflow( client_state(), workflow_id :: binary(), run_id :: binary() | nil, opts :: keyword() ) :: :ok | {:error, term()}