Account bot basis

This commit is contained in:
2025-08-19 15:16:25 +08:00
parent c056938b6e
commit bf181b88ec
13 changed files with 512 additions and 31 deletions

View File

@@ -43,6 +43,20 @@ public static class ServiceInjectionHelper
});
services.AddSingleton<AccountClientHelper>();
services.AddSingleton<BotAccountReceiverService.BotAccountReceiverServiceClient>(sp =>
{
var etcdClient = sp.GetRequiredService<IEtcdClient>();
var config = sp.GetRequiredService<IConfiguration>();
var clientCertPath = config["Service:ClientCert"]!;
var clientKeyPath = config["Service:ClientKey"]!;
var clientCertPassword = config["Service:CertPassword"];
return GrpcClientHelper
.CreateBotAccountReceiverServiceClient(etcdClient, clientCertPath, clientKeyPath, clientCertPassword)
.GetAwaiter()
.GetResult();
});
services.AddSingleton<ActionLogService.ActionLogServiceClient>(sp =>
{
var etcdClient = sp.GetRequiredService<IEtcdClient>();