Remote / foldkit-remote/testing

RemoteRunnerOptions

interface · packages/remote/src/scenario.ts:205

interface RemoteRunnerOptions<AppModel, Principal> {
  readonly data: RemoteDomain<AppModel, any, any, any, any>
  readonly model: AppModel
  readonly backend: (
    rows: WriteScenario<Principal>['given'],
    principal: Option.Option<Principal>,
  ) => Layer.Layer<RemoteClient, unknown>
}

What Scenario.remote is made from.

Members

RemoteRunnerOptions.data

property · packages/remote/src/scenario.ts:206

readonly data: RemoteDomain<AppModel, any, any, any, any>

RemoteRunnerOptions.model

property · packages/remote/src/scenario.ts:208

readonly model: AppModel

The application's Model before the client holds anything.

RemoteRunnerOptions.backend

property · packages/remote/src/scenario.ts:215

readonly backend: (
  rows: WriteScenario<Principal>['given'],
  principal: Option.Option<Principal>,
) => Layer.Layer<RemoteClient, unknown>

A server over exactly these rows, answering as this principal. Called twice for one scenario, once per run it makes, so each call must give a backend of its own: a shared one would hold the first write when the second is judged.