/** * @since 1.0.0 */ import type * as Context from "@effect/data/Context"; import type * as Effect from "@effect/io/Effect"; import type * as Layer from "@effect/io/Layer"; import type * as Schedule from "@effect/io/Schedule"; /** * @since 1.0.0 * @category symbols */ export declare const ReloadableTypeId: unique symbol; /** * @since 1.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 1.0.0 * @category models */ export interface Reloadable extends Reloadable.Variance { } /** * @since 1.0.0 */ export declare namespace Reloadable { /** * @since 1.0.0 * @category models */ interface Variance { readonly [ReloadableTypeId]: { readonly _A: (_: never) => A; }; } } /** * 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 1.0.0 * @category constructors */ export declare const auto: , In, E, R>(tag: Out, options: { readonly layer: Layer.Layer>; readonly schedule: Schedule.Schedule; }) => Layer.Layer>>; /** * 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 1.0.0 * @category constructors */ export declare const autoFromConfig: , In, E, R>(tag: Out, options: { readonly layer: Layer.Layer>; readonly scheduleFromConfig: (context: Context.Context) => Schedule.Schedule; }) => Layer.Layer>>; /** * Retrieves the current version of the reloadable service. * * @since 1.0.0 * @category getters */ export declare const get: >(tag: T) => Effect.Effect>, never, Context.Tag.Service>; /** * Makes a new reloadable service from a layer that describes the construction * of a static service. * * @since 1.0.0 * @category constructors */ export declare const manual: , In, E>(tag: Out, options: { readonly layer: Layer.Layer>; }) => Layer.Layer>>; /** * Reloads the specified service. * * @since 1.0.0 * @category constructors */ export declare const reload: >(tag: T) => Effect.Effect>, unknown, void>; /** * @since 1.0.0 * @category context */ export declare const tag: >(tag: T) => Context.Tag>, Reloadable>>; /** * Forks the reload of the service in the background, ignoring any errors. * * @since 1.0.0 * @category constructors */ export declare const reloadFork: >(tag: T) => Effect.Effect>, unknown, void>; //# sourceMappingURL=Reloadable.d.ts.map