/** * @since 1.0.0 */ import type { Pipeable } from "@effect/data/Pipeable"; import type * as Effect from "@effect/io/Effect"; import type * as Fiber from "@effect/io/Fiber"; import type * as Metric from "@effect/io/Metric"; import type * as Schedule from "@effect/io/Schedule"; import type * as Scope from "@effect/io/Scope"; /** * @since 1.0.0 * @category symbols */ export declare const PollingMetricTypeId: unique symbol; /** * @since 1.0.0 * @category symbols */ export type PollingMetricTypeId = typeof PollingMetricTypeId; /** * A `PollingMetric` is a combination of a metric and an effect that polls for * updates to the metric. * * @since 1.0.0 * @category models */ export interface PollingMetric extends Pipeable { readonly [PollingMetricTypeId]: PollingMetricTypeId; /** * The metric that this `PollingMetric` polls to update. */ readonly metric: Metric.Metric; /** * An effect that polls a value that may be fed to the metric. */ readonly poll: Effect.Effect; } /** * Constructs a new polling metric from a metric and poll effect. * * @since 1.0.0 * @category constructors */ export declare const make: (metric: Metric.Metric, poll: Effect.Effect) => PollingMetric; /** * Collects all of the polling metrics into a single polling metric, which * polls for, updates, and produces the outputs of all individual metrics. * * @since 1.0.0 * @category constructors */ export declare const collectAll: (iterable: Iterable>) => PollingMetric, Array, R, E, Array>; /** * Returns an effect that will launch the polling metric in a background * fiber, using the specified schedule. * * @since 1.0.0 * @category utils */ export declare const launch: { (schedule: Schedule.Schedule): (self: PollingMetric) => Effect.Effect>; (self: PollingMetric, schedule: Schedule.Schedule): Effect.Effect>; }; /** * An effect that polls a value that may be fed to the metric. * * @since 1.0.0 * @category utils */ export declare const poll: (self: PollingMetric) => Effect.Effect; /** * An effect that polls for a value and uses the value to update the metric. * * @since 1.0.0 * @category utils */ export declare const pollAndUpdate: (self: PollingMetric) => Effect.Effect; /** * Returns a new polling metric whose poll function will be retried with the * specified retry policy. * * @since 1.0.0 * @category constructors */ export declare const retry: { (policy: Schedule.Schedule): (self: PollingMetric) => PollingMetric; (self: PollingMetric, policy: Schedule.Schedule): PollingMetric; }; /** * Zips this polling metric with the specified polling metric. * * @since 1.0.0 * @category utils */ export declare const zip: { (that: PollingMetric): (self: PollingMetric) => PollingMetric; (self: PollingMetric, that: PollingMetric): PollingMetric; }; //# sourceMappingURL=MetricPolling.d.ts.map