adds the ability for shards to sync with the main server regarding their caches, when pulling files from main server the shard can stream it to the client directly while downloading and add info for server to report to client regarding file locations across shards
This commit is contained in:
@@ -97,6 +97,7 @@ public class Startup
|
||||
// specific services
|
||||
if (_isMain)
|
||||
{
|
||||
services.AddSingleton<IShardFileInventoryReporter, NullShardFileInventoryReporter>();
|
||||
services.AddSingleton<IClientReadyMessageService, MainClientReadyMessageService>();
|
||||
services.AddHostedService<MainFileCleanupService>();
|
||||
services.AddSingleton<IConfigurationService<StaticFilesServerConfiguration>, LightlessConfigurationServiceServer<StaticFilesServerConfiguration>>();
|
||||
@@ -184,6 +185,9 @@ public class Startup
|
||||
}
|
||||
else
|
||||
{
|
||||
services.AddSingleton<ShardFileInventoryReporter>();
|
||||
services.AddSingleton<IShardFileInventoryReporter>(sp => sp.GetRequiredService<ShardFileInventoryReporter>());
|
||||
services.AddHostedService(sp => sp.GetRequiredService<ShardFileInventoryReporter>());
|
||||
services.AddSingleton<ShardRegistrationService>();
|
||||
services.AddHostedService(s => s.GetRequiredService<ShardRegistrationService>());
|
||||
services.AddSingleton<IClientReadyMessageService, ShardClientReadyMessageService>();
|
||||
|
||||
Reference in New Issue
Block a user