@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, 06:00 UTC

main
ts 49 lines 1.51 KB
Raw
1 import type * as workstations from "@distilled.cloud/gcp/workstations_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 { WorkstationCluster } from "./WorkstationCluster.ts";
6
7 export interface GetWorkstationClusterRequest extends Omit<
8 workstations.GetProjectsLocationsWorkstationClustersRequest,
9 "name"
10 > {}
11
12 /**
13 * Runtime binding for Cloud Workstations `workstationClusters.get`.
14 *
15 * Bind this operation to a {@link WorkstationCluster} in a Function/Action
16 * init phase. Provide {@link GetWorkstationClusterHttp}.
17 *
18 * Grants `roles/workstations.viewer` on the project because workstation
19 * clusters have no IAM policy of their own.
20 *
21 * ### Observing Clusters
22 * **Example:** Read the bound cluster
23 * ```typescript
24 * const getCluster = yield* GCP.Workstations.GetWorkstationCluster(cluster);
25 * const live = yield* getCluster();
26 * ```
27 *
28 * @binding
29 * @category Workstations
30 */
31 export interface GetWorkstationCluster extends Binding.Service<
32 GetWorkstationCluster,
33 "GCP.Workstations.GetWorkstationCluster",
34 (
35 cluster: WorkstationCluster,
36 ) => Effect.Effect<
37 (
38 request?: GetWorkstationClusterRequest,
39 ) => Effect.Effect<
40 workstations.WorkstationCluster,
41 workstations.GetProjectsLocationsWorkstationClustersError,
42 RuntimeContext
43 >
44 >
45 > {}
46
47 export const GetWorkstationCluster = Binding.Service<GetWorkstationCluster>(
48 "GCP.Workstations.GetWorkstationCluster",
49 );