ASM.Run.ApprovalCoordinator (ASM v0.9.2)

Copy Markdown View Source

Pure state helper for approval ownership indexing.

Summary

Types

state()

@type state() :: %{optional(String.t()) => pid()}

Functions

clear(index, approval_id)

@spec clear(state(), String.t()) :: state()

new()

@spec new() :: state()

register(index, run_pid, approval_request)

@spec register(state(), pid(), ASM.Control.ApprovalRequest.t()) :: state()

resolve(index, approval_id)

@spec resolve(state(), String.t()) ::
  {:ok, pid(), state()} | {:error, :unknown_approval, state()}