@effect-aws/client-mq
v1.1.0
Published
[![npm version](https://img.shields.io/npm/v/%40effect-aws%2Fclient-mq?color=brightgreen&label=npm%20package)](https://www.npmjs.com/package/@effect-aws/client-mq) [![npm downloads](https://img.shields.io/npm/dm/%40effect-aws%2Fclient-mq)](https://www.npm
Downloads
313
Readme
@effect-aws/client-mq
Installation
npm install --save @effect-aws/client-mq
Usage
With default MqClient instance:
import { Mq } from "@effect-aws/client-mq";
const program = Mq.listBrokers(args);
const result = pipe(
program,
Effect.provide(Mq.defaultLayer),
Effect.runPromise,
);
With custom MqClient instance:
import { Mq } from "@effect-aws/client-mq";
const program = Mq.listBrokers(args);
const result = await pipe(
program,
Effect.provide(
Mq.baseLayer(() => new MqClient({ region: "eu-central-1" })),
),
Effect.runPromise,
);
With custom MqClient configuration:
import { Mq } from "@effect-aws/client-mq";
const program = Mq.listBrokers(args);
const result = await pipe(
program,
Effect.provide(Mq.layer({ region: "eu-central-1" })),
Effect.runPromiseExit,
);
or use Mq.baseLayer((default) => new MqClient({ ...default, region: "eu-central-1" }))