(scope: Construct, id: string, props?: StackProps)
| 8 | |
| 9 | export class AwsMicroservicesStack extends Stack { |
| 10 | constructor(scope: Construct, id: string, props?: StackProps) { |
| 11 | super(scope, id, props); |
| 12 | |
| 13 | const database = new SwnDatabase(this, 'Database'); |
| 14 | |
| 15 | const microservices = new SwnMicroservices(this, 'Microservices', { |
| 16 | productTable: database.productTable, |
| 17 | basketTable: database.basketTable, |
| 18 | orderTable: database.orderTable |
| 19 | }); |
| 20 | |
| 21 | const apigateway = new SwnApiGateway(this, 'ApiGateway', { |
| 22 | productMicroservice: microservices.productMicroservice, |
| 23 | basketMicroservice: microservices.basketMicroservice, |
| 24 | orderingMicroservices: microservices.orderingMicroservice |
| 25 | }); |
| 26 | |
| 27 | const queue = new SwnQueue(this, 'Queue', { |
| 28 | consumer: microservices.orderingMicroservice |
| 29 | }); |
| 30 | |
| 31 | const eventbus = new SwnEventBus(this, 'EventBus', { |
| 32 | publisherFuntion: microservices.basketMicroservice, |
| 33 | targetQueue: queue.orderQueue |
| 34 | }); |
| 35 | |
| 36 | } |
| 37 | } |
nothing calls this directly
no outgoing calls
no test coverage detected