PtcRunner.Upstream.Runtime (PtcRunner v0.12.0)

Copy Markdown View Source

OTP-backed upstream runtime handle for root ptc_runner callers.

Summary

Functions

call_tool(runtime, server, tool, args, opts)

@spec call_tool(struct() | pid(), String.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, atom(), String.t()}

catalog_snapshot(runtime)

@spec catalog_snapshot(struct() | pid()) :: [map()]

catalog_text(runtime)

@spec catalog_text(struct() | pid()) :: String.t()

child_spec(init_arg)

@spec child_spec(keyword()) :: Supervisor.child_spec()

Returns a specification to start this module under a supervisor.

See Supervisor.

defaults(runtime)

@spec defaults(struct() | pid()) :: map()

diagnostics(runtime)

@spec diagnostics(struct() | pid()) :: map()

scrub(runtime, term)

@spec scrub(struct() | pid(), term()) :: term()

start_link(opts \\ [])

@spec start_link(keyword()) ::
  {:ok,
   %PtcRunner.Upstream.Runtime{
     catalog_exposure_mode: term(),
     catalog_snapshot_mode: term(),
     pid: term()
   }}
  | :ignore
  | {:error, term()}

stop(pid)

@spec stop(struct() | pid()) :: :ok

upstream(runtime, name)

@spec upstream(struct() | pid(), String.t()) :: map() | nil

upstream_names(runtime)

@spec upstream_names(struct() | pid()) :: [String.t()]