Skip to content

HttpRunner

13 exports Added in v1.0.0 Source

Http App

toHttpEffect

Added in v1.0.0 Source

Signature

declare const toHttpEffect: Effect.Effect<
  Effect.Effect<HttpServerResponse, never, Scope | HttpServerRequest>,
  never,
  Scope | RpcSerialization.RpcSerialization | Sharding.Sharding | MessageStorage
>;

Signature

declare const toHttpEffectWebsocket: Effect.Effect<
  Effect.Effect<HttpServerResponse, never, Scope | HttpServerRequest>,
  never,
  Scope | RpcSerialization.RpcSerialization | Sharding.Sharding | MessageStorage
>;

Layers

layerClient

Added in v1.0.0 Source

Signature

declare const layerClient: Layer.Layer<
  Sharding.Sharding | Runners.Runners,
  never,
  | ShardingConfig.ShardingConfig
  | Runners.RpcClientProtocol
  | MessageStorage
  | RunnerStorage
  | RunnerHealth
>;

Signature

declare function layerClientProtocolHttp(options: {
  readonly https?: boolean;
  readonly path: string;
}): Layer<RpcClientProtocol, never, any>;

Signature

declare const layerClientProtocolHttpDefault: Layer.Layer<
  Runners.RpcClientProtocol,
  never,
  RpcSerialization.RpcSerialization | HttpClient.HttpClient
>;

Signature

declare function layerClientProtocolWebsocket(options: {
  readonly https?: boolean;
  readonly path: string;
}): Layer<RpcClientProtocol, never, any>;

Signature

declare const layerClientProtocolWebsocketDefault: Layer.Layer<
  Runners.RpcClientProtocol,
  never,
  RpcSerialization.RpcSerialization | Socket.WebSocketConstructor
>;

layerHttp

Added in v1.0.0 Source

Signature

declare const layerHttp: Layer.Layer<
  Sharding.Sharding | Runners.Runners,
  never,
  | RpcSerialization.RpcSerialization
  | ShardingConfig.ShardingConfig
  | HttpClient.HttpClient
  | HttpServer.HttpServer
  | MessageStorage
  | RunnerStorage
  | RunnerHealth
>;

Signature

declare const layerHttpClientOnly: Layer.Layer<
  Sharding.Sharding | Runners.Runners,
  never,
  | RpcSerialization.RpcSerialization
  | ShardingConfig.ShardingConfig
  | HttpClient.HttpClient
  | MessageStorage
  | RunnerStorage
>;

A HTTP layer for the Runners services, that adds a route to the provided HttpRouter.

Signature

declare function layerHttpOptions(options: {
  readonly path: PathInput;
}): Layer<Sharding | Runners, never, any>;

Signature

declare const layerWebsocket: Layer.Layer<
  Sharding.Sharding | Runners.Runners,
  never,
  | RpcSerialization.RpcSerialization
  | ShardingConfig.ShardingConfig
  | Socket.WebSocketConstructor
  | HttpServer.HttpServer
  | MessageStorage
  | RunnerStorage
  | RunnerHealth
>;

Signature

declare const layerWebsocketClientOnly: Layer.Layer<
  Sharding.Sharding | Runners.Runners,
  never,
  | ShardingConfig.ShardingConfig
  | MessageStorage
  | RunnerStorage
  | RpcSerialization.RpcSerialization
  | Socket.WebSocketConstructor
>;

Signature

declare function layerWebsocketOptions(options: {
  readonly path: PathInput;
}): Layer<Sharding | Runners, never, any>;