♻️ Still don't know what I am doing

This commit is contained in:
2025-07-13 23:38:57 +08:00
parent 03e26ef93c
commit cde55eb237
23 changed files with 300 additions and 170 deletions

View File

@ -33,17 +33,6 @@ public static class GrpcClientHelper
return response.Kvs[0].Value.ToStringUtf8();
}
public static AccountService.AccountServiceClient CreateAccountServiceClient(
string url,
string clientCertPath,
string clientKeyPath,
string? clientCertPassword = null
)
{
return new AccountService.AccountServiceClient(CreateCallInvoker(url, clientCertPath, clientKeyPath,
clientCertPassword));
}
public static async Task<AccountService.AccountServiceClient> CreateAccountServiceClient(
IEtcdClient etcdClient,
string clientCertPath,
@ -51,22 +40,11 @@ public static class GrpcClientHelper
string? clientCertPassword = null
)
{
var url = await GetServiceUrlFromEtcd(etcdClient, "AccountService");
var url = await GetServiceUrlFromEtcd(etcdClient, "DysonNetwork.Pass");
return new AccountService.AccountServiceClient(CreateCallInvoker(url, clientCertPath, clientKeyPath,
clientCertPassword));
}
public static AuthService.AuthServiceClient CreateAuthServiceClient(
string url,
string clientCertPath,
string clientKeyPath,
string? clientCertPassword = null
)
{
return new AuthService.AuthServiceClient(CreateCallInvoker(url, clientCertPath, clientKeyPath,
clientCertPassword));
}
public static async Task<AuthService.AuthServiceClient> CreateAuthServiceClient(
IEtcdClient etcdClient,
string clientCertPath,
@ -74,22 +52,11 @@ public static class GrpcClientHelper
string? clientCertPassword = null
)
{
var url = await GetServiceUrlFromEtcd(etcdClient, "AuthService");
var url = await GetServiceUrlFromEtcd(etcdClient, "DysonNetwork.Pass");
return new AuthService.AuthServiceClient(CreateCallInvoker(url, clientCertPath, clientKeyPath,
clientCertPassword));
}
public static PusherService.PusherServiceClient CreatePusherServiceClient(
string url,
string clientCertPath,
string clientKeyPath,
string? clientCertPassword = null
)
{
return new PusherService.PusherServiceClient(CreateCallInvoker(url, clientCertPath, clientKeyPath,
clientCertPassword));
}
public static async Task<PusherService.PusherServiceClient> CreatePusherServiceClient(
IEtcdClient etcdClient,
string clientCertPath,
@ -97,7 +64,7 @@ public static class GrpcClientHelper
string? clientCertPassword = null
)
{
var url = await GetServiceUrlFromEtcd(etcdClient, "PusherService");
var url = await GetServiceUrlFromEtcd(etcdClient, "DysonNetwork.Pusher");
return new PusherService.PusherServiceClient(CreateCallInvoker(url, clientCertPath, clientKeyPath,
clientCertPassword));
}