Skip to content
Effect Days 2026 Get your ticket

BunClusterHttp

2 exports Added in v1.0.0 Source

Layers

layer

Added in v1.0.0 Source

Signature

declare function layer<ClientOnly extends boolean = false, Storage extends "local" | "sql" | "byo" = never>(options: {
readonly clientOnly?: ClientOnly;
readonly serialization?: "msgpack" | "ndjson";
readonly serializationMaxBufferSize?: number | "unbounded";
readonly shardingConfig?: any;
readonly storage?: Storage;
readonly transport: "http" | "websocket";
}): ClientOnly extends true ? Layer<any, ConfigError, "local" extends Storage ? never : "byo" extends Storage ? any : SqlClient> : Layer<any, any, "local" extends Storage ? never : "byo" extends Storage ? any : SqlClient>

Signature

declare const layerHttpServer: Layer.Layer<HttpPlatform | Etag.Generator | BunContext | HttpServer, ServeError, ShardingConfig.ShardingConfig>