|
|
@ -9,11 +9,13 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; |
|
|
|
using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.HealthChecks; |
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
using Payment.API.IntegrationEvents.EventHandling; |
|
|
|
using Payment.API.IntegrationEvents.Events; |
|
|
|
using RabbitMQ.Client; |
|
|
|
using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
namespace Payment.API |
|
|
|
{ |
|
|
@ -70,6 +72,11 @@ namespace Payment.API |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
services.AddHealthChecks(checks => |
|
|
|
{ |
|
|
|
checks.AddValueTaskCheck("HTTP Endpoint", () => new ValueTask<IHealthCheckResult>(HealthCheckResult.Healthy("Ok"))); |
|
|
|
}); |
|
|
|
|
|
|
|
RegisterEventBus(services); |
|
|
|
|
|
|
|
services.AddSwaggerGen(options => |
|
|
|