 9eb5967935
			
		
	
	9eb5967935
	
	
	
		
			
			* rework server responsibilities add remote configuration * start metrics only when compiled as not debug * add some more logging to discord bot * fixes of some casts * make metrics port configurable, minor fixes * add docker bullshit * md formatting * adjustments to docker stuff * fix docker json files, fix some stuff in discord bot, add /useradd for Discord bot * adjust docker configs and fix sharded.bat * fixes for logs, cache file provider repeat trying to open filestream Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
		
			
				
	
	
		
			29 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using MareSynchronosShared.Utils;
 | |
| using System.Text;
 | |
| 
 | |
| namespace MareSynchronosStaticFilesServer;
 | |
| 
 | |
| public class StaticFilesServerConfiguration : MareConfigurationBase
 | |
| {
 | |
|     public Uri FileServerGrpcAddress { get; set; } = null;
 | |
|     public int ForcedDeletionOfFilesAfterHours { get; set; } = -1;
 | |
|     public double CacheSizeHardLimitInGiB { get; set; } = -1;
 | |
|     public int UnusedFileRetentionPeriodInDays { get; set; } = 14;
 | |
|     public string CacheDirectory { get; set; }
 | |
|     public Uri? RemoteCacheSourceUri { get; set; } = null;
 | |
|     public Uri MainServerGrpcAddress { get; set; } = null;
 | |
|     public override string ToString()
 | |
|     {
 | |
|         StringBuilder sb = new();
 | |
|         sb.AppendLine(base.ToString());
 | |
|         sb.AppendLine($"{nameof(FileServerGrpcAddress)} => {FileServerGrpcAddress}");
 | |
|         sb.AppendLine($"{nameof(MainServerGrpcAddress)} => {MainServerGrpcAddress}");
 | |
|         sb.AppendLine($"{nameof(ForcedDeletionOfFilesAfterHours)} => {ForcedDeletionOfFilesAfterHours}");
 | |
|         sb.AppendLine($"{nameof(CacheSizeHardLimitInGiB)} => {CacheSizeHardLimitInGiB}");
 | |
|         sb.AppendLine($"{nameof(UnusedFileRetentionPeriodInDays)} => {UnusedFileRetentionPeriodInDays}");
 | |
|         sb.AppendLine($"{nameof(CacheDirectory)} => {CacheDirectory}");
 | |
|         sb.AppendLine($"{nameof(RemoteCacheSourceUri)} => {RemoteCacheSourceUri}");
 | |
|         return sb.ToString();
 | |
|     }
 | |
| }
 |