mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-23 06:38:50 +00:00
Finishing implementation of SendEvent (#1765)
This commit is contained in:
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.OneFuzz.Service.OneFuzzLib.Orm;
|
||||
using ApiService.OneFuzzLib;
|
||||
|
||||
namespace Microsoft.OneFuzz.Service;
|
||||
|
||||
@ -33,8 +34,12 @@ public class Program
|
||||
.ConfigureServices((context, services) =>
|
||||
services
|
||||
.AddSingleton<ILogTracerFactory>(_ => new LogTracerFactory(GetLoggers()))
|
||||
.AddScoped<ILogTracer>(s => s.GetService<LogTracerFactory>()?.MakeLogTracer(Guid.NewGuid()) ?? throw new InvalidOperationException("Unable to create a logger"))
|
||||
.AddSingleton<IStorageProvider>(_ => new StorageProvider(EnvironmentVariables.OneFuzz.FuncStorage ?? throw new InvalidOperationException("Missing account id")))
|
||||
.AddSingleton<INodeOperations, NodeOperations>()
|
||||
.AddSingleton<IEvents, Events>()
|
||||
.AddSingleton<IWebhookOperations, WebhookOperations>()
|
||||
.AddSingleton<IWebhookMessageLogOperations, WebhookMessageLogOperations>()
|
||||
.AddSingleton<IQueue, Queue>()
|
||||
.AddSingleton<ICreds>(_ => new Creds())
|
||||
.AddSingleton<IStorage, Storage>()
|
||||
)
|
||||
|
Reference in New Issue
Block a user