OrchidSymbiont.Handler (orchid_symbiont v0.2.7)

Copy Markdown View Source

A struct representing a resolved symbiont reference.

This struct wraps the process reference and provides metadata for communicating with the underlying worker.

Fields

  • :name - The logical name of the symbiont
  • :ref - The process reference (PID or via-tuple)
  • :adapter - The module to use for communication (default: GenServer)
  • :metadata - Additional metadata about the handler

Usage

Use OrchidSymbiont.call/3 to communicate with the worker:

handler = %{name: :model, ref: pid, adapter: GenServer, metadata: %{}}
OrchidSymbiont.call(handler, {:predict, input})

Summary

Types

t()

@type t() :: %OrchidSymbiont.Handler{
  adapter: module(),
  metadata: map() | keyword() | nil,
  name: term(),
  ref: {atom(), node()} | pid() | atom()
}