t3-code-android-nightly/.repos/alchemy-effect/packages/alchemy/test/GCP/BigQueryConnection/fixtures/bindings-host.ts
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

28 lines
965 B
TypeScript

import * as GCP from "@/GCP";
import * as Effect from "effect/Effect";
import { serveProbes } from "../../bindingHost.ts";
/** Connection the host reads (roles/bigquery.connectionUser on it). */
export const Cloud = GCP.BigQueryConnection.Connection("Cloud", {
location: "us-central1",
cloudResource: {},
});
/**
* Effect-native Cloud Run service exercising every BigQuery Connection
* binding as its own runtime service account. Deployed from
* {@link ../Bindings.test.ts}.
*/
export default class BigQueryConnectionBindingsHost extends GCP.Function<BigQueryConnectionBindingsHost>()(
"BigQueryConnectionBindingsHost",
{ main: import.meta.url, invokerIamDisabled: true },
Effect.gen(function* () {
const getConnection = yield* GCP.BigQueryConnection.GetConnection(Cloud);
return {
fetch: serveProbes({
getConnection: getConnection(),
}),
};
}).pipe(Effect.provide(GCP.BigQueryConnection.GetConnectionHttp)),
) {}