Continue port of QueueNodeHearbeat (#1761)

[WIP ] continue port of  QueueNodeHearbeat
This commit is contained in:
Cheick Keita
2022-04-07 11:55:12 -07:00
committed by GitHub
parent 5004b7902a
commit 627b401c87
16 changed files with 1043 additions and 306 deletions

View File

@ -34,7 +34,9 @@ public class Program
var host = new HostBuilder()
.ConfigureFunctionsWorkerDefaults()
.ConfigureServices((context, services) =>
services.AddSingleton(_ => new LogTracerFactory(GetLoggers()))
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<ICreds>(_ => new Creds())
.AddSingleton<IStorage, Storage>()