@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

main
ts 40 lines 1.14 KB
Raw
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 StopInstanceRequest extends Omit<
8 compute.StopInstancesRequest,
9 "instance" | "zone" | "project"
10 > {}
11
12 /**
13 * Runtime binding for Compute Engine `instances.stop`.
14 *
15 * Bind this operation to an {@link Instance} in a Function/Action init phase.
16 * Provide {@link StopInstanceHttp}.
17 *
18 * ### Instance Lifecycle Control
19 * **Example:** Stop the bound instance
20 * ```typescript
21 * const stopInstance = yield* GCP.Compute.StopInstance(vm);
22 * yield* stopInstance();
23 * ```
24 *
25 * @binding
26 * @category Compute
27 */
28 export interface StopInstance extends Binding.Service<
29 StopInstance,
30 "GCP.Compute.StopInstance",
31 (
32 instance: Instance,
33 ) => Effect.Effect<
34 (
35 request?: StopInstanceRequest,
36 ) => Effect.Effect<compute.Operation, compute.StopInstancesError, RuntimeContext>
37 >
38 > {}
39
40 export const StopInstance = Binding.Service<StopInstance>("GCP.Compute.StopInstance");