Insider.Adapter.CLI (Insider Lab v0.1.0)

Copy Markdown View Source

Bounded Erlang-term, JSON, and NDJSON transport over Insider.Protocol.

This module deliberately does not implement runtime operations. Hosts inject an Insider.Adapter.CLI.Dispatcher; the standalone executable uses a closed dispatcher that returns unsupported.

Summary

Types

dispatcher()

@type dispatcher() ::
  module() | (Insider.Protocol.Request.t() -> Insider.Protocol.Result.t())

Functions

capabilities()

@spec capabilities() :: map()

discovery()

@spec discovery() :: map()

invoke(input, dispatcher \\ UnavailableDispatcher)

Invokes one already-decoded request or one string-keyed request map.

invoke_json(bytes, dispatcher \\ UnavailableDispatcher)

@spec invoke_json(binary(), dispatcher()) :: {binary(), non_neg_integer()}

invoke_ndjson(bytes, dispatcher \\ UnavailableDispatcher)

@spec invoke_ndjson(binary(), dispatcher()) :: {binary(), non_neg_integer()}