public static IConveyBuilder AddQoSViolation(this IConveyBuilder builder) { return(builder .AddQoSViolationHelpers() .AddQoSTrackingDecorators() .AddRuntimeMetrics()); }
public static IConveyBuilder AddInfrastructure(this IConveyBuilder builder) { var requestsOptions = builder.GetOptions <RequestsOptions>("requests"); builder.Services.AddSingleton(requestsOptions); builder.Services .AddTransient <ICommandHandler <ICommand>, GenericCommandHandler <ICommand> >() .AddTransient <IEventHandler <IEvent>, GenericEventHandler <IEvent> >() .AddTransient <IEventHandler <IRejectedEvent>, GenericRejectedEventHandler <IRejectedEvent> >() .AddTransient <IHubService, HubService>() .AddTransient <IHubWrapper, HubWrapper>() .AddSingleton <IOperationsService, OperationsService>() .AddSingleton <IDateTimeProvider, DateTimeProvider>(); builder.Services.AddGrpc(); builder.AddQoSViolationHelpers() .AddRuntimeMetrics(); builder.Services .AddQuartz() .AddQoSViolationChecker(requestsOptions); return(builder .AddErrorHandler <ExceptionToResponseMapper>() .AddJwt() .AddCommandHandlers() .AddEventHandlers() .AddQueryHandlers() .AddHttpClient() .AddConsul() .AddFabio() .AddRabbitMq(plugins: p => p.AddJaegerRabbitMqPlugin()) .AddMongo() .AddRedis() .AddMetrics() .AddJaeger() .AddRedis() .AddSignalR() .AddWebApiSwaggerDocs()); }