/** * Bun Redis integration backed by Bun's built-in `RedisClient`. * * This module creates scoped Bun `RedisClient` connections and exposes them as * both the portable `Redis` service and the Bun-specific `BunRedis` service for * direct access to the raw client. The `layer` helper accepts Redis options * directly, while `layerConfig` reads them from Effect config. Both also accept * `Redis.PoolOptions` for the connections behind `Redis.reserve`, and close the * underlying clients when the layer scope finalizes. * * @stability unstable * @since 4.0.0 */ import type { RedisClient, RedisOptions } from "bun"; import * as Config from "effect/Config"; import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as Redis from "effect/persistence/Redis"; declare const BunRedis_base: Context.ServiceClass(f: (client: RedisClient) => Promise) => Effect.Effect; }>; /** * Service tag for Bun Redis integration, exposing the raw `RedisClient` and a `use` helper that maps client promise failures to `RedisError`. * * @stability unstable * @category services * @since 4.0.0 */ export declare class BunRedis extends BunRedis_base { } type BunRedisOptions = { readonly url?: string; } & RedisOptions & Redis.PoolOptions; /** * Creates scoped Bun Redis layers for `Redis.Redis` and `BunRedis`, closing the underlying client when the scope finalizes. * * @stability unstable * @category layers * @since 4.0.0 */ export declare const layer: (options?: BunRedisOptions | undefined) => Layer.Layer; /** * Creates scoped Bun Redis layers from configurable Redis options, closing the underlying client when the scope finalizes. * * @stability unstable * @category layers * @since 4.0.0 */ export declare const layerConfig: (options: Config.Wrap) => Layer.Layer; export {}; //# sourceMappingURL=BunRedis.d.ts.map