Skip to main content Link Search Menu Expand Document (external link)

Redis.ts overview

Since v1.0.0


Exports Grouped by Category


Constructors

make

Signature

declare const make: (
  options: CommonRedisOptions &
    SentinelConnectionOptions &
    Partial<TcpOptions & IpcOptions> & { disconnectTimeout?: number; tls?: ConnectionOptions } & {
      readonly prefix?: string | undefined
    }
) => Effect.Effect<
  {
    readonly fixedWindow: (options: {
      readonly key: string
      readonly tokens: number
      readonly refillRate: Duration.Duration
      readonly limit: number | undefined
    }) => Effect.Effect<readonly [count: number, ttl: number], RateLimiter.RateLimiterError>
    readonly tokenBucket: (options: {
      readonly key: string
      readonly tokens: number
      readonly limit: number
      readonly refillRate: Duration.Duration
      readonly allowOverflow: boolean
    }) => Effect.Effect<number, RateLimiter.RateLimiterError>
  },
  never,
  Scope
>

Source

Since v1.0.0

Layers

layerStore

Signature

declare const layerStore: (
  options: RedisOptions & { readonly prefix?: string | undefined }
) => Layer.Layer<RateLimiter.RateLimiterStore, never, never>

Source

Since v1.0.0

layerStoreConfig

Signature

declare const layerStoreConfig: (
  options: Config.Config.Wrap<RedisOptions & { readonly prefix?: string | undefined }>
) => Layer.Layer<RateLimiter.RateLimiterStore, ConfigError, never>

Source

Since v1.0.0