| 1 | import * as Alchemy from "alchemy"; |
| 2 | import * as GCP from "alchemy/GCP"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | import Api from "./src/Api.ts"; |
| 5 | import { Counters } from "./src/resources.ts"; |
| 6 | |
| 7 | export default Alchemy.Stack( |
| 8 | "GcpMemorystoreRedisExample", |
| 9 | { providers: GCP.providers(), state: Alchemy.localState() }, |
| 10 | Effect.gen(function* () { |
| 11 | const counters = yield* Counters; |
| 12 | const api = yield* Api; |
| 13 | |
| 14 | return { |
| 15 | url: api.uri, |
| 16 | serviceName: api.name, |
| 17 | instanceName: counters.name, |
| 18 | redisHost: counters.host, |
| 19 | }; |
| 20 | }), |
| 21 | ); |