| 1 | import type * as schemas from "@distilled.cloud/aws/schemas"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Discoverer } from "./Discoverer.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `schemas:StartDiscoverer`. |
| 8 | * |
| 9 | * Resumes schema discovery on the bound {@link Discoverer} — e.g. an ops |
| 10 | * function re-enabling discovery after a paused window. The discoverer id is |
| 11 | * injected from the binding. Provide the implementation with |
| 12 | * `Effect.provide(AWS.Schemas.StartDiscovererHttp)`. |
| 13 | * ### Controlling a Discoverer |
| 14 | * **Example:** Resume Discovery |
| 15 | * ```typescript |
| 16 | * // init — bind the operation to the discoverer |
| 17 | * const startDiscoverer = yield* AWS.Schemas.StartDiscoverer(discoverer); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { State } = yield* startDiscoverer(); |
| 21 | * // State === "STARTED" |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface StartDiscoverer extends Binding.Service< |
| 27 | StartDiscoverer, |
| 28 | "AWS.Schemas.StartDiscoverer", |
| 29 | ( |
| 30 | discoverer: Discoverer, |
| 31 | ) => Effect.Effect< |
| 32 | () => Effect.Effect< |
| 33 | schemas.StartDiscovererResponse, |
| 34 | schemas.StartDiscovererError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | export const StartDiscoverer = Binding.Service<StartDiscoverer>( |
| 39 | "AWS.Schemas.StartDiscoverer", |
| 40 | ); |