The best way to control Claude Code, Codex and more from any computer or phone

main
ts 37 lines 1.34 KB
Raw
1 import type * as kafka from "@distilled.cloud/aws/kafka";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { ServerlessCluster } from "./ServerlessCluster.ts";
5
6 /**
7 * Runtime binding for the `GetBootstrapBrokers` operation (IAM action
8 * `kafka:GetBootstrapBrokers`), scoped to one {@link ServerlessCluster}.
9 *
10 * Resolves the cluster's bootstrap broker connection strings at runtime —
11 * for MSK Serverless the SASL/IAM string
12 * (`BootstrapBrokerStringSaslIam`) is the one Kafka clients connect to.
13 * Provide the implementation with
14 * `Effect.provide(AWS.Kafka.GetBootstrapBrokersHttp)`.
15 * ### Connecting to a Cluster
16 * **Example:** Resolve the SASL/IAM Bootstrap Brokers
17 * ```typescript
18 * const getBootstrapBrokers = yield* Kafka.GetBootstrapBrokers(cluster);
19 *
20 * const brokers = yield* getBootstrapBrokers();
21 * // brokers.BootstrapBrokerStringSaslIam → "b-1.….kafka-serverless.…:9098"
22 * ```
23 *
24 * @binding
25 */
26 export interface GetBootstrapBrokers extends Binding.Service<
27 GetBootstrapBrokers,
28 "AWS.Kafka.GetBootstrapBrokers",
29 (
30 cluster: ServerlessCluster,
31 ) => Effect.Effect<
32 () => Effect.Effect<kafka.GetBootstrapBrokersResponse, kafka.GetBootstrapBrokersError>
33 >
34 > {}
35 export const GetBootstrapBrokers = Binding.Service<GetBootstrapBrokers>(
36 "AWS.Kafka.GetBootstrapBrokers",
37 );