Gaps fill up, fixes, ui restructuring
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using StellaOps.Telemetry.Federation.Aggregation;
|
||||
using StellaOps.Telemetry.Federation.Bundles;
|
||||
using StellaOps.Telemetry.Federation.Consent;
|
||||
using StellaOps.Telemetry.Federation.Intelligence;
|
||||
using StellaOps.Telemetry.Federation.Privacy;
|
||||
using StellaOps.Telemetry.Federation.Sync;
|
||||
|
||||
namespace StellaOps.Telemetry.Federation;
|
||||
|
||||
public static class FederationServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddFederatedTelemetry(
|
||||
this IServiceCollection services,
|
||||
Action<FederatedTelemetryOptions>? configureOptions = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(services);
|
||||
|
||||
services.AddOptions<FederatedTelemetryOptions>()
|
||||
.Configure(options => configureOptions?.Invoke(options));
|
||||
|
||||
services.TryAddSingleton<IPrivacyBudgetTracker, PrivacyBudgetTracker>();
|
||||
services.TryAddSingleton<ITelemetryAggregator, TelemetryAggregator>();
|
||||
services.TryAddSingleton<IConsentManager, ConsentManager>();
|
||||
services.TryAddSingleton<IFederatedTelemetryBundleBuilder, FederatedTelemetryBundleBuilder>();
|
||||
services.TryAddSingleton<IExploitIntelligenceMerger, ExploitIntelligenceMerger>();
|
||||
services.TryAddSingleton<FederatedIntelligenceNormalizer>();
|
||||
services.TryAddSingleton<IEgressPolicyIntegration, EgressPolicyIntegration>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
public static IServiceCollection AddFederatedTelemetrySync(
|
||||
this IServiceCollection services)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(services);
|
||||
|
||||
services.AddHostedService<FederatedTelemetrySyncService>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user