blob: fb7e8f32d0cf9a53f2606a639c02641c8e219dce (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
using Microsoft.Extensions.Configuration;
namespace MatrixContentFilter;
public class MatrixContentFilterConfiguration {
public MatrixContentFilterConfiguration(IConfiguration config) => config.GetRequiredSection("MatrixContentFilter").Bind(this);
public List<string> Admins { get; set; } = new();
public ConcurrencyLimitsConfiguration ConcurrencyLimits { get; set; } = new();
public string AppMode { get; set; } = "bot";
public string AsyncQueueImplementation { get; set; } = "lifo";
public SanityCheckConfiguration SanityCheck { get; set; } = new();
public OpenTelemetryConfiguration OpenTelemetry { get; set; } = new();
public class ConcurrencyLimitsConfiguration {
public int Redactions { get; set; } = 1;
public int LogMessages { get; set; } = 1;
}
public class SanityCheckConfiguration {
public bool Enabled { get; set; } = false;
public int MaxConcurrency { get; set; } = 1;
public TimeSpan Interval { get; set; } = TimeSpan.FromMinutes(5);
}
public class OpenTelemetryConfiguration {
public bool Enabled { get; set; } = false;
public string Endpoint { get; set; }
public string ServiceName { get; set; }
public string Environment { get; set; }
}
}
|