💥 Rename Pusher to Ring

This commit is contained in:
2025-09-14 19:42:51 +08:00
parent 4ee387ab76
commit 5c97733b3e
52 changed files with 308 additions and 308 deletions

View File

@@ -110,15 +110,15 @@ public static class GrpcClientHelper
clientCertPassword));
}
public static async Task<PusherService.PusherServiceClient> CreatePusherServiceClient(
public static async Task<RingService.RingServiceClient> CreateRingServiceClient(
IEtcdClient etcdClient,
string clientCertPath,
string clientKeyPath,
string? clientCertPassword = null
)
{
var url = await GetServiceUrlFromEtcd(etcdClient, "DysonNetwork.Pusher");
return new PusherService.PusherServiceClient(CreateCallInvoker(url, clientCertPath, clientKeyPath,
var url = await GetServiceUrlFromEtcd(etcdClient, "DysonNetwork.Ring");
return new RingService.RingServiceClient(CreateCallInvoker(url, clientCertPath, clientKeyPath,
clientCertPassword));
}

View File

@@ -10,8 +10,8 @@ import "google/protobuf/wrappers.proto";
import "account.proto";
// PusherService provides methods to send various types of notifications.
service PusherService {
// RingService provides methods to send various types of notifications.
service RingService {
// Sends an email.
rpc SendEmail(SendEmailRequest) returns (google.protobuf.Empty) {}
@@ -117,7 +117,7 @@ message GetWebsocketConnectionStatusResponse {
}
service PusherHandlerService {
service RingHandlerService {
rpc ReceiveWebSocketPacket(ReceiveWebSocketPacketRequest) returns (google.protobuf.Empty) {}
}

View File

@@ -7,9 +7,9 @@ namespace DysonNetwork.Shared.Registry;
public static class ServiceInjectionHelper
{
public static IServiceCollection AddPusherService(this IServiceCollection services)
public static IServiceCollection AddRingService(this IServiceCollection services)
{
services.AddSingleton<PusherService.PusherServiceClient>(sp =>
services.AddSingleton<RingService.RingServiceClient>(sp =>
{
var etcdClient = sp.GetRequiredService<IEtcdClient>();
var config = sp.GetRequiredService<IConfiguration>();
@@ -18,7 +18,7 @@ public static class ServiceInjectionHelper
var clientCertPassword = config["Service:CertPassword"];
return GrpcClientHelper
.CreatePusherServiceClient(etcdClient, clientCertPath, clientKeyPath, clientCertPassword)
.CreateRingServiceClient(etcdClient, clientCertPath, clientKeyPath, clientCertPassword)
.GetAwaiter()
.GetResult();
});