Search documentation of Plushie

# Plushie.Test.SessionPool.Transport (Plushie v0.7.2)

Copy Markdown View Source

Transport helpers for `Plushie.Test.SessionPool`.

This module owns renderer process startup and wire writes so the pool and mode-specific state machines do not need to know about Port setup details.

## Summary

### Types

format()

Wire format used between the Elixir test backend and the renderer.

### Functions

multiplexed_args(mode, format, max_sessions)
open_renderer_port(renderer_path, env, format, args)
renderer_mode_flag(atom)
send_initial_settings(port, format, session_id)
send_to_port(port, format, msg)
windowed_args(format)

## Types

# format()

    @type format() :: :json | :msgpack

Wire format used between the Elixir test backend and the renderer.

## Functions

# multiplexed_args(mode, format, max_sessions)

    @spec multiplexed_args(:mock | :headless, format(), pos_integer()) :: [String.t()]

# open_renderer_port(renderer_path, env, format, args)

    @spec open_renderer_port(String.t(), [{String.t(), String.t()}], format(), [
      String.t()
    ]) :: port()

# renderer_mode_flag(atom)

    @spec renderer_mode_flag(:mock | :headless) :: String.t()

# send_initial_settings(port, format, session_id)

    @spec send_initial_settings(port(), format(), String.t()) :: true

# send_to_port(port, format, msg)

    @spec send_to_port(port(), format(), map()) :: true

# windowed_args(format)

    @spec windowed_args(format()) :: [String.t()]