TemporalSdk.Nexus (temporal_sdk v0.2.0)

View Source

Temporal nexus task module.

WIP. Module will provide Temporal Nexus services.

Summary

Functions

await_data(ets_pattern)

@spec await_data(ets_pattern :: term()) ::
  {:ok, :temporal_sdk_nexus.data()} | :timeout | :invalid_pattern | no_return()

await_data(ets_pattern, timeout)

@spec await_data(ets_pattern :: term(), timeout :: :erlang.timeout()) ::
  {:ok, :temporal_sdk_nexus.data()} | :timeout | :invalid_pattern | no_return()

cancel(canceled_details)

@spec cancel(canceled_details :: :temporal_sdk.term_to_payloads()) :: no_return()

cancel_requested()

@spec cancel_requested() :: boolean() | no_return()

complete(result)

@spec complete(result :: :temporal_sdk.term_to_payloads()) :: no_return()

elapsed_time()

@spec elapsed_time() :: native_time :: non_neg_integer() | no_return()

elapsed_time(unit)

@spec elapsed_time(unit :: :erlang.time_unit()) :: non_neg_integer() | no_return()

fail(application_failure)

get_data()

@spec get_data() :: data :: :temporal_sdk_nexus.data() | no_return()

remaining_time()

@spec remaining_time() :: native_time :: non_neg_integer() | :infinity | no_return()

remaining_time(unit)

@spec remaining_time(unit :: :erlang.time_unit()) ::
  non_neg_integer() | :infinity | no_return()

set_data(task_data)

@spec set_data(task_data :: term()) :: :ok