@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 41 lines 1.45 KB
Raw
1 import type * as dax from "@distilled.cloud/aws/dax";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Cluster } from "./Cluster.ts";
5
6 /**
7 * Runtime binding for the `IncreaseReplicationFactor` operation (IAM action
8 * `dax:IncreaseReplicationFactor`), scoped to one {@link Cluster}.
9 *
10 * Adds read-replica nodes to the bound DAX cluster — the building block of
11 * scale-out automation (e.g. a Lambda reacting to a CloudWatch alarm on
12 * cluster CPU or cache-miss rate). Provide the implementation with
13 * `Effect.provide(AWS.DAX.IncreaseReplicationFactorHttp)`.
14 * ### Scaling a Cluster
15 * **Example:** Scale Out to Three Nodes
16 * ```typescript
17 * const increaseReplicationFactor =
18 * yield* DAX.IncreaseReplicationFactor(cluster);
19 *
20 * const result = yield* increaseReplicationFactor({
21 * NewReplicationFactor: 3,
22 * });
23 * // result.Cluster?.TotalNodes → 3 (new nodes provision asynchronously)
24 * ```
25 *
26 * @binding
27 */
28 export interface IncreaseReplicationFactor extends Binding.Service<
29 IncreaseReplicationFactor,
30 "AWS.DAX.IncreaseReplicationFactor",
31 (
32 cluster: Cluster,
33 ) => Effect.Effect<
34 (
35 request: Omit<dax.IncreaseReplicationFactorRequest, "ClusterName">,
36 ) => Effect.Effect<dax.IncreaseReplicationFactorResponse, dax.IncreaseReplicationFactorError>
37 >
38 > {}
39 export const IncreaseReplicationFactor = Binding.Service<IncreaseReplicationFactor>(
40 "AWS.DAX.IncreaseReplicationFactor",
41 );