import type { FlyMachineConfig, FlyMachineMount, FlyMachineService, ImageRef as FlyImageRef, Machine as FlyMachine, Volume as FlyVolume } from "@distilled.cloud/fly-io/machines"; import * as machines from "@distilled.cloud/fly-io/machines"; import * as Effect from "effect/Effect"; import type { MachineGuest, MachineImageRef } from "./Machine.ts"; import { type FlyAlchemyType } from "./Metadata.ts"; import type { DiskSpec, MountedDisk } from "./MountVolume.ts"; declare const ReplicaNotCreated_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "Fly.ReplicaNotCreated"; } & Readonly; export declare class ReplicaNotCreated extends ReplicaNotCreated_base<{ name: string; appName: string; }> { } export interface Replica { machineId: string; name: string; region: string; state: string; instanceId: string | undefined; privateIp: string | undefined; imageRef: MachineImageRef | undefined; guest: MachineGuest | undefined; mounts: MountedDisk[]; } export interface ReplicaSet { appName: string; machineId: string; machineIds: string[]; name: string; region: string; state: string; instanceId: string | undefined; privateIp: string | undefined; imageRef: MachineImageRef | undefined; guest: MachineGuest | undefined; url: string | undefined; count: number; mounts: MountedDisk[]; replicas: Replica[]; } export declare const gone: (machine: FlyMachine | undefined) => boolean; export declare const getMachineById: (appName: string, machineId: string) => Effect.Effect; export declare const listMachinesByApp: (appName: string) => Effect.Effect; export declare const resolveCount: (count: number | undefined) => number; export declare const replicaMachineName: (base: string, index: number, count: number) => string; export declare const replicaIndexOf: (machine: FlyMachine) => number; export declare const alchemyIdOf: (machine: FlyMachine) => string | undefined; export declare const isOwnedType: (machine: FlyMachine, type: FlyAlchemyType) => boolean; export declare const toImageRef: (ref: FlyImageRef | undefined) => MachineImageRef | undefined; export declare const toGuestAttrs: (guest: { cpu_kind?: string; cpus?: number; memory_mb?: number; gpu_kind?: string; gpus?: number; } | undefined) => MachineGuest | undefined; export declare const hasPublishedService: (services: FlyMachineService[] | undefined) => boolean; export declare const waitStarted: (appName: string, machineId: string) => Effect.Effect; export declare const waitDestroyed: (appName: string, machineId: string) => Effect.Effect; export declare const ensureStarted: (appName: string, machine: FlyMachine, skipLaunch: boolean) => Effect.Effect; export declare const deleteMachine: (appName: string, machineId: string) => Effect.Effect; export declare const toReplica: (machine: FlyMachine, volumesById: Map) => Replica; export declare const toReplicaSet: (replicas: Replica[], appName: string, baseName: string, services?: FlyMachineService[]) => ReplicaSet; export declare const listReplicas: (input: { appName: string; id: string; type: FlyAlchemyType; }) => Effect.Effect; export declare const listReplicaSets: (type: FlyAlchemyType) => Effect.Effect; export declare const reconcileReplicas: (input: { id: string; type: FlyAlchemyType; appName: string; baseName: string; region: string; count: number; disks: DiskSpec[]; skipLaunch?: boolean; minSecretsVersion?: number; outputMachineIds?: readonly string[]; preferVolumeIds?: ReadonlyArray>; configDrifted: (machine: FlyMachine, desired: { mounts: FlyMachineMount[]; metadata: Record; }) => boolean; buildConfig: (replica: { index: number; mounts: FlyMachineMount[]; metadata: Record; }) => FlyMachineConfig; }) => Effect.Effect; export declare const deleteReplicaSet: (input: { appName: string; machineIds: readonly string[]; volumeIds: readonly string[]; }) => Effect.Effect; export declare const volumeIdsOf: (set: { mounts?: readonly MountedDisk[]; replicas?: readonly Replica[]; }) => string[]; export declare const observeReplicaSet: (input: { appName?: string; id: string; type: FlyAlchemyType; machineIds?: readonly string[]; baseName?: string; }) => Effect.Effect; export {}; //# sourceMappingURL=replicas.d.ts.map