@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 39 lines 1.28 KB
Raw
1 import type * as SD from "@distilled.cloud/aws/servicediscovery";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Service } from "./Service.ts";
5
6 export interface RegisterInstanceRequest extends Omit<SD.RegisterInstanceRequest, "ServiceId"> {}
7
8 /**
9 * Runtime binding for `servicediscovery:RegisterInstance` — lets a
10 * self-registering workload create or update its own Cloud Map instance
11 * (an upsert on the instance ID).
12 *
13 * The response carries an `OperationId`; registration completes
14 * asynchronously on the Cloud Map side.
15 * ### Registering Instances
16 * **Example:** Self-register on Startup
17 * ```typescript
18 * const registerInstance = yield* AWS.CloudMap.RegisterInstance(service);
19 *
20 * yield* registerInstance({
21 * InstanceId: "worker-1",
22 * Attributes: { AWS_INSTANCE_IPV4: "10.0.1.10" },
23 * });
24 * ```
25 *
26 * @binding
27 */
28 export interface RegisterInstance extends Binding.Service<
29 RegisterInstance,
30 "AWS.CloudMap.RegisterInstance",
31 <S extends Service>(
32 service: S,
33 ) => Effect.Effect<
34 (
35 request: RegisterInstanceRequest,
36 ) => Effect.Effect<SD.RegisterInstanceResponse, SD.RegisterInstanceError>
37 >
38 > {}
39 export const RegisterInstance = Binding.Service<RegisterInstance>("AWS.CloudMap.RegisterInstance");