/** * @since 2.0.0 */ import type * as Context from "./Context.js"; import type * as Effect from "./Effect.js"; import type * as Layer from "./Layer.js"; import type * as Schedule from "./Schedule.js"; import type * as Types from "./Types.js"; /** * @since 2.0.0 * @category symbols */ export declare const ReloadableTypeId: unique symbol; /** * @since 2.0.0 * @category symbols */ export type ReloadableTypeId = typeof ReloadableTypeId; /** * A `Reloadable` is an implementation of some service that can be dynamically * reloaded, or swapped out for another implementation on-the-fly. * * @since 2.0.0 * @category models */ export interface Reloadable extends Reloadable.Variance { } /** * @since 2.0.0 */ export declare namespace Reloadable { /** * @since 2.0.0 * @category models */ interface Variance { readonly [ReloadableTypeId]: { readonly _A: Types.Invariant; }; } } /** * Makes a new reloadable service from a layer that describes the construction * of a static service. The service is automatically reloaded according to the * provided schedule. * * @since 2.0.0 * @category constructors */ export declare const auto: (tag: Context.Tag, options: { readonly layer: Layer.Layer; readonly schedule: Schedule.Schedule; }) => Layer.Layer, E, R | In>; /** * Makes a new reloadable service from a layer that describes the construction * of a static service. The service is automatically reloaded according to a * schedule, which is extracted from the input to the layer. * * @since 2.0.0 * @category constructors */ export declare const autoFromConfig: (tag: Context.Tag, options: { readonly layer: Layer.Layer; readonly scheduleFromConfig: (context: Context.Context) => Schedule.Schedule; }) => Layer.Layer, E, R | In>; /** * Retrieves the current version of the reloadable service. * * @since 2.0.0 * @category getters */ export declare const get: (tag: Context.Tag) => Effect.Effect>; /** * Makes a new reloadable service from a layer that describes the construction * of a static service. * * @since 2.0.0 * @category constructors */ export declare const manual: (tag: Context.Tag, options: { readonly layer: Layer.Layer; }) => Layer.Layer, E, In>; /** * Reloads the specified service. * * @since 2.0.0 * @category constructors */ export declare const reload: (tag: Context.Tag) => Effect.Effect>; /** * @since 2.0.0 * @category context */ export declare const tag: (tag: Context.Tag) => Context.Tag, Reloadable>; /** * Forks the reload of the service in the background, ignoring any errors. * * @since 2.0.0 * @category constructors */ export declare const reloadFork: (tag: Context.Tag) => Effect.Effect>; //# sourceMappingURL=Reloadable.d.ts.map