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