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, 04:45 UTC
| 1 | import type * as compute from "@distilled.cloud/gcp/compute_v1"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type { RuntimeContext } from "alchemy/RuntimeContext"; |
| 4 | import type * as Effect from "effect/Effect"; |
| 5 | import type { Instance } from "./Instance.ts"; |
| 6 | |
| 7 | export interface StartInstanceRequest extends Omit< |
| 8 | compute.StartInstancesRequest, |
| 9 | "instance" | "zone" | "project" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Compute Engine `instances.start`. |
| 14 | * |
| 15 | * Bind this operation to an {@link Instance} in a Function/Action init phase. |
| 16 | * Provide {@link StartInstanceHttp}. |
| 17 | * |
| 18 | * ### Instance Lifecycle Control |
| 19 | * **Example:** Start the bound instance |
| 20 | * ```typescript |
| 21 | * const startInstance = yield* GCP.Compute.StartInstance(vm); |
| 22 | * yield* startInstance(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | * @category Compute |
| 27 | */ |
| 28 | export interface StartInstance extends Binding.Service< |
| 29 | StartInstance, |
| 30 | "GCP.Compute.StartInstance", |
| 31 | ( |
| 32 | instance: Instance, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request?: StartInstanceRequest, |
| 36 | ) => Effect.Effect<compute.Operation, compute.StartInstancesError, RuntimeContext> |
| 37 | > |
| 38 | > {} |
| 39 | |
| 40 | export const StartInstance = Binding.Service<StartInstance>("GCP.Compute.StartInstance"); |