Skip to content

Commit e4cceec

Browse files
authored
Maybe this could help ? (#30)
add EventStoreHealthIndicator & EventStoreSubscriptionHealthIndicator, in registerAsync
1 parent 7b8681b commit e4cceec

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/event-store.module.ts

+20-1
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,27 @@ export class EventStoreModule {
6363
},
6464
inject: [...options.inject, Logger],
6565
},
66+
{
67+
provide: EventStoreHealthIndicator,
68+
useFactory: eventStore => {
69+
return new EventStoreHealthIndicator(eventStore);
70+
},
71+
inject: [EventStore],
72+
},
73+
{
74+
provide: EventStoreSubscriptionHealthIndicator,
75+
useFactory: eventStore => {
76+
return new EventStoreSubscriptionHealthIndicator(eventStore);
77+
},
78+
inject: [EventStore],
79+
},
80+
],
81+
exports: [
82+
EventStore,
83+
EventStoreModule,
84+
EventStoreHealthIndicator,
85+
EventStoreSubscriptionHealthIndicator,
6686
],
67-
exports: [EventStoreModule],
6887
};
6988
}
7089
}

0 commit comments

Comments
 (0)