defmodule FastCi do @moduledoc """ Documentation for `FastCi`. """ alias FastCi.Servers.Websocket @doc """ Create a connection to the server to be used for test orchestration. It will send a message that the topic has been joined in case of a successfull connection. """ @spec connect_to_test_orchestrator( run_key :: bitstring(), test_modules :: list(module()), pid :: term() | pid() ) :: DynamicSupervisor.on_start_child() def connect_to_test_orchestrator(run_key, test_modules, pid \\ self()) do FastCi.Supervisors.WebsocketSupervisor.add_child(%{ id: run_key, start: {Websocket, :start_link, [[run_key, test_modules, pid]]}, restart: :permanent }) end end