The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import type * as glue from "@distilled.cloud/aws/glue"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { Crawler } from "./Crawler.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `glue:StartCrawler`. |
| 8 | * |
| 9 | * Starts a crawl of the bound {@link Crawler} on demand — the standard way |
| 10 | * to refresh the Data Catalog right after new data lands. Fails with the |
| 11 | * typed `CrawlerRunningException` if a crawl is already in progress. The |
| 12 | * crawler name is injected from the binding. Provide the implementation with |
| 13 | * `Effect.provide(AWS.Glue.StartCrawlerHttp)`. |
| 14 | * ### Running Crawlers |
| 15 | * **Example:** Kick Off a Crawl |
| 16 | * ```typescript |
| 17 | * // init |
| 18 | * const startCrawler = yield* AWS.Glue.StartCrawler(crawler); |
| 19 | * |
| 20 | * // runtime — tolerate an already-running crawl |
| 21 | * yield* startCrawler().pipe( |
| 22 | * Effect.catchTag("CrawlerRunningException", () => Effect.void), |
| 23 | * ); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface StartCrawler extends Binding.Service< |
| 29 | StartCrawler, |
| 30 | "AWS.Glue.StartCrawler", |
| 31 | ( |
| 32 | crawler: Crawler, |
| 33 | ) => Effect.Effect<() => Effect.Effect<glue.StartCrawlerResponse, glue.StartCrawlerError>> |
| 34 | > {} |
| 35 | |
| 36 | export const StartCrawler = Binding.Service<StartCrawler>("AWS.Glue.StartCrawler"); |