Temporalex.Interceptor.Context (Temporalex v0.5.4)

Copy Markdown View Source

What is being intercepted.

A struct rather than a bare operation atom so fields can be added without breaking every existing interceptor. Match on :operation and ignore the rest:

def intercept(%Context{operation: :start_workflow}, opts, next), do: ...
def intercept(%Context{}, opts, next), do: next.(opts)

Summary

Types

t()

@type t() :: %Temporalex.Interceptor.Context{client: term(), operation: atom()}