@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 40 lines 1.14 KB
Raw
1 import type * as kafka from "@distilled.cloud/gcp/managedkafka_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 { ClustersTopic } from "./ClustersTopic.ts";
6
7 export interface GetTopicRequest extends Omit<
8 kafka.GetProjectsLocationsClustersTopicsRequest,
9 "name"
10 > {}
11
12 /**
13 * Runtime binding for Managed Kafka `topics.get`.
14 *
15 * Bind this operation to a {@link ClustersTopic} in a Function/Action
16 * init phase. Provide {@link GetTopicHttp}.
17 *
18 * ### Observing Topics
19 * **Example:** Read the bound topic
20 * ```typescript
21 * const getTopic = yield* GCP.ManagedKafka.GetTopic(topic);
22 * const live = yield* getTopic();
23 * ```
24 *
25 * @binding
26 * @category ManagedKafka
27 */
28 export interface GetTopic extends Binding.Service<
29 GetTopic,
30 "GCP.ManagedKafka.GetTopic",
31 (
32 topic: ClustersTopic,
33 ) => Effect.Effect<
34 (
35 request?: GetTopicRequest,
36 ) => Effect.Effect<kafka.Topic, kafka.GetProjectsLocationsClustersTopicsError, RuntimeContext>
37 >
38 > {}
39
40 export const GetTopic = Binding.Service<GetTopic>("GCP.ManagedKafka.GetTopic");