Plexus.Run (Plexus v0.1.0)

Copy Markdown View Source

Run-scoped coordination without a hot coordinator mailbox.

A run is a supervised resource island. Its immutable/rarely-mutated config is read from per-run ETS, actor processes are partitioned across dynamic supervisors, and graph/cache/record operations go directly to per-run ETS.

Summary

Types

t()

@type t() :: pid() | term()

Functions

actor_pid(run, actor_id)

@spec actor_pid(t(), term()) :: {:ok, pid()} | {:error, :not_found}

call(run, actor_id, message, timeout \\ 5000)

@spec call(t(), term(), term(), timeout()) :: term()

cast(run, actor_id, message)

@spec cast(t(), term(), term()) :: :ok | {:error, :not_found}

config(run)

@spec config(t()) :: map()

prune(run, actor_id)

@spec prune(t(), term()) :: :ok

Cancel work and terminate every process in the child subtree before deleting topology.

run_id(run)

@spec run_id(t()) :: term()

start_actor(run, opts)

@spec start_actor(t(), keyword()) :: DynamicSupervisor.on_start_child()

start_run(opts)

@spec start_run(keyword()) :: {:ok, pid()} | {:error, term()}

stop_run(run, reason \\ :normal)

@spec stop_run(t(), term()) :: :ok | {:error, :not_found}

terminate_actor(run, actor_id)

@spec terminate_actor(t(), term()) :: :ok | {:error, :not_found}