feat: add Redis identify ratelimiter

This commit is contained in:
spiral 2022-01-13 12:26:25 -05:00
parent 8aa2b0b7aa
commit 2aead40449
No known key found for this signature in database
GPG key ID: A6059F0CA0E1BD31
15 changed files with 449 additions and 40 deletions

View file

@ -0,0 +1,14 @@
using StackExchange.Redis;
namespace PluralKit.Core;
public class RedisService
{
public ConnectionMultiplexer Connection { get; set; }
public async Task InitAsync(CoreConfig config)
{
if (config.RedisAddr != null)
Connection = await ConnectionMultiplexer.ConnectAsync(config.RedisAddr);
}
}