| 1 | import type * as deadline from "@distilled.cloud/aws/deadline"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Queue } from "./Queue.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `deadline:GetStep`. |
| 8 | * |
| 9 | * Reads a step's detail for a job in the bound {@link Queue} — lifecycle |
| 10 | * status, task run status counts, dependency counts, parameter space. The |
| 11 | * queue's `farmId`/`queueId` are injected from the binding. Provide the |
| 12 | * implementation with `Effect.provide(AWS.Deadline.GetStepHttp)`. |
| 13 | * ### Monitoring Steps |
| 14 | * **Example:** Inspect A Step |
| 15 | * ```typescript |
| 16 | * // init — bind the operation to the queue |
| 17 | * const getStep = yield* AWS.Deadline.GetStep(queue); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const step = yield* getStep({ jobId, stepId }); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface GetStep extends Binding.Service< |
| 26 | GetStep, |
| 27 | "AWS.Deadline.GetStep", |
| 28 | ( |
| 29 | queue: Queue, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request: Omit<deadline.GetStepRequest, "farmId" | "queueId">, |
| 33 | ) => Effect.Effect<deadline.GetStepResponse, deadline.GetStepError> |
| 34 | > |
| 35 | > {} |
| 36 | export const GetStep = Binding.Service<GetStep>("AWS.Deadline.GetStep"); |