The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import * as Kubernetes from "@alchemy.run/kubernetes"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import { Files, FilesGCS } from "./Files.ts"; |
| 4 | import { Gke } from "./Gke.ts"; |
| 5 | |
| 6 | // #region show |
| 7 | export default Kubernetes.Job( |
| 8 | "Report", |
| 9 | Effect.gen(function* () { |
| 10 | return { main: import.meta.url, cluster: yield* Gke }; |
| 11 | }), |
| 12 | Effect.gen(function* () { |
| 13 | const files = yield* Files; |
| 14 | return { |
| 15 | run: Effect.gen(function* () { |
| 16 | const report = `generated at ${new Date().toISOString()}`; |
| 17 | yield* files.upload("report.txt", report); |
| 18 | }), |
| 19 | }; |
| 20 | }).pipe(Effect.provide(FilesGCS)), |
| 21 | ); |
| 22 | // #endregion show |