💥 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

@@ -67,7 +67,7 @@
tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-pass:latest
platforms: linux/amd64
build-pusher:
build-ring:
runs-on: ubuntu-latest
permissions:
contents: read
@@ -91,10 +91,10 @@
- name: Build and push DysonNetwork.Pusher Docker image
uses: docker/build-push-action@v6
with:
file: DysonNetwork.Pusher/Dockerfile
file: DysonNetwork.Ring/Dockerfile
context: .
push: true
tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-pusher:latest
tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-ring:latest
platforms: linux/amd64
build-drive:
@@ -186,4 +186,3 @@
push: true
tags: ghcr.io/${{ vars.PACKAGE_OWNER }}/dyson-develop:latest
platforms: linux/amd64

View File

@@ -21,7 +21,7 @@
"DomainMappings": {
"DysonNetwork.Pass": "id.solsynth.dev",
"DysonNetwork.Drive": "drive.solsynth.dev",
"DysonNetwork.Pusher": "push.solsynth.dev",
"DysonNetwork.Ring": "push.solsynth.dev",
"DysonNetwork.Sphere": "sphere.solsynth.dev"
},
"PathAliases": {
@@ -31,7 +31,7 @@
"DirectRoutes": [
{
"Path": "/ws",
"Service": "DysonNetwork.Pusher"
"Service": "DysonNetwork.Ring"
},
{
"Path": "/api/tus",

View File

@@ -14,7 +14,7 @@ public class AccountEventService(
Wallet.PaymentService payment,
ICacheService cache,
IStringLocalizer<Localization.AccountEventResource> localizer,
PusherService.PusherServiceClient pusher,
RingService.RingServiceClient pusher,
SubscriptionService subscriptions,
Pass.Leveling.ExperienceService experienceService
)

View File

@@ -28,7 +28,7 @@ public class AccountService(
FileReferenceService.FileReferenceServiceClient fileRefs,
AccountUsernameService uname,
EmailService mailer,
PusherService.PusherServiceClient pusher,
RingService.RingServiceClient pusher,
IStringLocalizer<NotificationResource> localizer,
IStringLocalizer<EmailResource> emailLocalizer,
ICacheService cache,

View File

@@ -10,7 +10,7 @@ namespace DysonNetwork.Pass.Account;
public class RelationshipService(
AppDatabase db,
ICacheService cache,
PusherService.PusherServiceClient pusher,
RingService.RingServiceClient pusher,
IStringLocalizer<NotificationResource> localizer
)
{

View File

@@ -22,7 +22,7 @@ public class AuthController(
AuthService auth,
GeoIpService geo,
ActionLogService als,
PusherService.PusherServiceClient pusher,
RingService.RingServiceClient pusher,
IConfiguration configuration,
IStringLocalizer<NotificationResource> localizer
) : ControllerBase

View File

@@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Components;
namespace DysonNetwork.Pass.Email;
public class EmailService(
PusherService.PusherServiceClient pusher,
RingService.RingServiceClient pusher,
RazorViewRenderer viewRenderer,
ILogger<EmailService> logger
)

View File

@@ -22,7 +22,7 @@ builder.Services.AddAppServices(builder.Configuration);
builder.Services.AddAppRateLimiting();
builder.Services.AddAppAuthentication();
builder.Services.AddAppSwagger();
builder.Services.AddPusherService();
builder.Services.AddRingService();
builder.Services.AddDriveService();
builder.Services.AddDevelopService();

View File

@@ -53,7 +53,7 @@ public static class ServiceCollectionExtensions
options.MaxSendMessageSize = 16 * 1024 * 1024; // 16MB
});
services.AddPusherService();
services.AddRingService();
// Register OIDC services
services.AddScoped<OidcService, GoogleOidcService>();

View File

@@ -17,7 +17,7 @@ namespace DysonNetwork.Pass.Wallet;
public class PaymentService(
AppDatabase db,
WalletService wat,
PusherService.PusherServiceClient pusher,
RingService.RingServiceClient pusher,
IStringLocalizer<NotificationResource> localizer,
INatsConnection nats
)

View File

@@ -18,7 +18,7 @@ public class SubscriptionService(
AppDatabase db,
PaymentService payment,
AccountService accounts,
PusherService.PusherServiceClient pusher,
RingService.RingServiceClient pusher,
IStringLocalizer<NotificationResource> localizer,
IConfiguration configuration,
ICacheService cache,

View File

@@ -1,27 +0,0 @@
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
RUN apt-get update && apt-get install -y --no-install-recommends \
libkrb5-dev
USER $APP_UID
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["DysonNetwork.Pusher/DysonNetwork.Pusher.csproj", "DysonNetwork.Pusher/"]
RUN dotnet restore "DysonNetwork.Pusher/DysonNetwork.Pusher.csproj"
COPY . .
WORKDIR "/src/DysonNetwork.Pusher"
RUN dotnet build "./DysonNetwork.Pusher.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./DysonNetwork.Pusher.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DysonNetwork.Pusher.dll"]

View File

@@ -1,6 +1,6 @@
using System.Linq.Expressions;
using System.Reflection;
using DysonNetwork.Pusher.Notification;
using DysonNetwork.Ring.Notification;
using DysonNetwork.Shared.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
@@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Query;
using NodaTime;
using Quartz;
namespace DysonNetwork.Pusher;
namespace DysonNetwork.Ring;
public class AppDatabase(
DbContextOptions<AppDatabase> options,

View File

@@ -1,4 +1,4 @@
namespace DysonNetwork.Pusher.Connection;
namespace DysonNetwork.Ring.Connection;
public class ClientTypeMiddleware(RequestDelegate next)
{

View File

@@ -1,7 +1,7 @@
using System.Net.WebSockets;
using DysonNetwork.Shared.Proto;
namespace DysonNetwork.Pusher.Connection;
namespace DysonNetwork.Ring.Connection;
public interface IWebSocketPacketHandler
{

View File

@@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
namespace DysonNetwork.Pusher.Connection;
namespace DysonNetwork.Ring.Connection;
[ApiController]
public class WebSocketController(WebSocketService ws, ILogger<WebSocketContext> logger) : ControllerBase

View File

@@ -4,7 +4,7 @@ using DysonNetwork.Shared.Proto;
using NodaTime;
using NodaTime.Serialization.SystemTextJson;
namespace DysonNetwork.Pusher.Connection;
namespace DysonNetwork.Ring.Connection;
public class WebSocketPacket
{

View File

@@ -5,7 +5,7 @@ using DysonNetwork.Shared.Data;
using DysonNetwork.Shared.Proto;
using Grpc.Core;
namespace DysonNetwork.Pusher.Connection;
namespace DysonNetwork.Ring.Connection;
public class WebSocketService
{
@@ -159,7 +159,7 @@ public class WebSocketService
clientKeyPath,
clientCertPassword
);
var client = new PusherHandlerService.PusherHandlerServiceClient(callInvoker);
var client = new RingHandlerService.RingHandlerServiceClient(callInvoker);
try
{

View File

@@ -0,0 +1,27 @@
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
RUN apt-get update && apt-get install -y --no-install-recommends \
libkrb5-dev
USER $APP_UID
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["DysonNetwork.Ring/DysonNetwork.Ring.csproj", "DysonNetwork.Ring/"]
RUN dotnet restore "DysonNetwork.Ring/DysonNetwork.Ring.csproj"
COPY . .
WORKDIR "/src/DysonNetwork.Ring"
RUN dotnet build "./DysonNetwork.Ring.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./DysonNetwork.Ring.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DysonNetwork.Ring.dll"]

View File

@@ -5,6 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<RootNamespace>DysonNetwork.Pusher</RootNamespace>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,7 +1,7 @@
using MailKit.Net.Smtp;
using MimeKit;
namespace DysonNetwork.Pusher.Email;
namespace DysonNetwork.Ring.Email;
public class EmailServiceConfiguration
{

View File

@@ -1,7 +1,7 @@
// <auto-generated />
using System;
using System.Collections.Generic;
using DysonNetwork.Pusher;
using DysonNetwork.Ring;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
@@ -11,7 +11,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DysonNetwork.Pusher.Migrations
namespace DysonNetwork.Ring.Migrations
{
[DbContext(typeof(AppDatabase))]
[Migration("20250713122638_InitialMigration")]
@@ -27,7 +27,7 @@ namespace DysonNetwork.Pusher.Migrations
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("DysonNetwork.Pusher.Notification.Notification", b =>
modelBuilder.Entity("DysonNetwork.Ring.Notification.Notification", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -89,7 +89,7 @@ namespace DysonNetwork.Pusher.Migrations
b.ToTable("notifications", (string)null);
});
modelBuilder.Entity("DysonNetwork.Pusher.Notification.PushSubscription", b =>
modelBuilder.Entity("DysonNetwork.Ring.Notification.PushSubscription", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()

View File

@@ -5,7 +5,7 @@ using NodaTime;
#nullable disable
namespace DysonNetwork.Pusher.Migrations
namespace DysonNetwork.Ring.Migrations
{
/// <inheritdoc />
public partial class InitialMigration : Migration

View File

@@ -1,7 +1,7 @@
// <auto-generated />
using System;
using System.Collections.Generic;
using DysonNetwork.Pusher;
using DysonNetwork.Ring;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
@@ -11,7 +11,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DysonNetwork.Pusher.Migrations
namespace DysonNetwork.Ring.Migrations
{
[DbContext(typeof(AppDatabase))]
[Migration("20250724070546_UpdateNotificationMeta")]
@@ -27,7 +27,7 @@ namespace DysonNetwork.Pusher.Migrations
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("DysonNetwork.Pusher.Notification.Notification", b =>
modelBuilder.Entity("DysonNetwork.Ring.Notification.Notification", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -90,7 +90,7 @@ namespace DysonNetwork.Pusher.Migrations
b.ToTable("notifications", (string)null);
});
modelBuilder.Entity("DysonNetwork.Pusher.Notification.PushSubscription", b =>
modelBuilder.Entity("DysonNetwork.Ring.Notification.PushSubscription", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()

View File

@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DysonNetwork.Pusher.Migrations
namespace DysonNetwork.Ring.Migrations
{
/// <inheritdoc />
public partial class UpdateNotificationMeta : Migration

View File

@@ -1,7 +1,7 @@
// <auto-generated />
using System;
using System.Collections.Generic;
using DysonNetwork.Pusher;
using DysonNetwork.Ring;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
@@ -10,7 +10,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DysonNetwork.Pusher.Migrations
namespace DysonNetwork.Ring.Migrations
{
[DbContext(typeof(AppDatabase))]
partial class AppDatabaseModelSnapshot : ModelSnapshot
@@ -24,7 +24,7 @@ namespace DysonNetwork.Pusher.Migrations
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("DysonNetwork.Pusher.Notification.Notification", b =>
modelBuilder.Entity("DysonNetwork.Ring.Notification.Notification", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -87,7 +87,7 @@ namespace DysonNetwork.Pusher.Migrations
b.ToTable("notifications", (string)null);
});
modelBuilder.Entity("DysonNetwork.Pusher.Notification.PushSubscription", b =>
modelBuilder.Entity("DysonNetwork.Ring.Notification.PushSubscription", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()

View File

@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
using DysonNetwork.Shared.Data;
using NodaTime;
namespace DysonNetwork.Pusher.Notification;
namespace DysonNetwork.Ring.Notification;
public class Notification : ModelBase
{

View File

@@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using NodaTime;
namespace DysonNetwork.Pusher.Notification;
namespace DysonNetwork.Ring.Notification;
[ApiController]
[Route("/api/notifications")]

View File

@@ -3,7 +3,7 @@ using EFCore.BulkExtensions;
using NodaTime;
using Quartz;
namespace DysonNetwork.Pusher.Notification;
namespace DysonNetwork.Ring.Notification;
public class NotificationFlushHandler(AppDatabase db) : IFlushHandler<Notification>
{

View File

@@ -1,13 +1,13 @@
using CorePush.Apple;
using CorePush.Firebase;
using DysonNetwork.Pusher.Connection;
using DysonNetwork.Pusher.Services;
using DysonNetwork.Ring.Connection;
using DysonNetwork.Ring.Services;
using DysonNetwork.Shared.Proto;
using Microsoft.EntityFrameworkCore;
using NodaTime;
using WebSocketPacket = DysonNetwork.Pusher.Connection.WebSocketPacket;
using WebSocketPacket = DysonNetwork.Ring.Connection.WebSocketPacket;
namespace DysonNetwork.Pusher.Notification;
namespace DysonNetwork.Ring.Notification;
public class PushService
{

View File

@@ -3,7 +3,7 @@ using DysonNetwork.Shared.Data;
using Microsoft.EntityFrameworkCore;
using NodaTime;
namespace DysonNetwork.Pusher.Notification;
namespace DysonNetwork.Ring.Notification;
public enum PushProvider
{

View File

@@ -1,5 +1,5 @@
using DysonNetwork.Pusher;
using DysonNetwork.Pusher.Startup;
using DysonNetwork.Ring;
using DysonNetwork.Ring.Startup;
using DysonNetwork.Shared.Auth;
using DysonNetwork.Shared.Http;
using DysonNetwork.Shared.Registry;

View File

@@ -1,19 +1,19 @@
using DysonNetwork.Pusher.Connection;
using DysonNetwork.Pusher.Email;
using DysonNetwork.Pusher.Notification;
using DysonNetwork.Ring.Connection;
using DysonNetwork.Ring.Email;
using DysonNetwork.Ring.Notification;
using DysonNetwork.Shared.Proto;
using DysonNetwork.Shared.Registry;
using Google.Protobuf.WellKnownTypes;
using Grpc.Core;
using System.Text.Json;
namespace DysonNetwork.Pusher.Services;
namespace DysonNetwork.Ring.Services;
public class PusherServiceGrpc(
public class RingServiceGrpc(
QueueService queueService,
WebSocketService websocket,
PushService pushService
) : PusherService.PusherServiceBase
) : RingService.RingServiceBase
{
public override async Task<Empty> SendEmail(SendEmailRequest request, ServerCallContext context)
{

View File

@@ -1,6 +1,6 @@
using System.Text.Json;
using DysonNetwork.Pusher.Email;
using DysonNetwork.Pusher.Notification;
using DysonNetwork.Ring.Email;
using DysonNetwork.Ring.Notification;
using DysonNetwork.Shared.Proto;
using DysonNetwork.Shared.Registry;
using DysonNetwork.Shared.Stream;
@@ -10,7 +10,7 @@ using NATS.Client.JetStream;
using NATS.Client.JetStream.Models;
using NATS.Net;
namespace DysonNetwork.Pusher.Services;
namespace DysonNetwork.Ring.Services;
public class QueueBackgroundService(
INatsConnection nats,

View File

@@ -4,7 +4,7 @@ using NATS.Client.Core;
using NATS.Client.JetStream;
using NATS.Net;
namespace DysonNetwork.Pusher.Services;
namespace DysonNetwork.Ring.Services;
public class QueueService(INatsConnection nats)
{

View File

@@ -1,9 +1,9 @@
using System.Net;
using DysonNetwork.Pusher.Services;
using DysonNetwork.Ring.Services;
using DysonNetwork.Shared.Http;
using Microsoft.AspNetCore.HttpOverrides;
namespace DysonNetwork.Pusher.Startup;
namespace DysonNetwork.Ring.Startup;
public static class ApplicationConfiguration
{
@@ -39,7 +39,7 @@ public static class ApplicationConfiguration
public static WebApplication ConfigureGrpcServices(this WebApplication app)
{
app.MapGrpcService<PusherServiceGrpc>();
app.MapGrpcService<RingServiceGrpc>();
return app;
}

View File

@@ -1,7 +1,7 @@
using DysonNetwork.Pusher.Notification;
using DysonNetwork.Ring.Notification;
using Quartz;
namespace DysonNetwork.Pusher.Startup;
namespace DysonNetwork.Ring.Startup;
public static class ScheduledJobsConfiguration
{

View File

@@ -3,10 +3,10 @@ using System.Text.Json.Serialization;
using System.Threading.RateLimiting;
using CorePush.Apple;
using CorePush.Firebase;
using DysonNetwork.Pusher.Connection;
using DysonNetwork.Pusher.Email;
using DysonNetwork.Pusher.Notification;
using DysonNetwork.Pusher.Services;
using DysonNetwork.Ring.Connection;
using DysonNetwork.Ring.Email;
using DysonNetwork.Ring.Notification;
using DysonNetwork.Ring.Services;
using DysonNetwork.Shared.Cache;
using Microsoft.AspNetCore.RateLimiting;
using Microsoft.OpenApi.Models;
@@ -14,7 +14,7 @@ using NodaTime;
using NodaTime.Serialization.SystemTextJson;
using StackExchange.Redis;
namespace DysonNetwork.Pusher.Startup;
namespace DysonNetwork.Ring.Startup;
public static class ServiceCollectionExtensions
{
@@ -44,7 +44,7 @@ public static class ServiceCollectionExtensions
services.AddGrpc();
// Register gRPC services
services.AddScoped<PusherServiceGrpc>();
services.AddScoped<RingServiceGrpc>();
// Register OIDC services
services.AddControllers().AddJsonOptions(options =>
@@ -88,7 +88,7 @@ public static class ServiceCollectionExtensions
options.SwaggerDoc("v1", new OpenApiInfo
{
Version = "v1",
Title = "Dyson Pusher",
Title = "Dyson Ring",
Description = "The pusher service of the Dyson Network. Mainly handling emailing, notifications and websockets.",
TermsOfService = new Uri("https://solsynth.dev/terms"),
License = new OpenApiLicense

View File

@@ -44,7 +44,7 @@
"::1"
],
"Service": {
"Name": "DysonNetwork.Pusher",
"Name": "DysonNetwork.Ring",
"Url": "https://localhost:7259",
"ClientCert": "../Certificates/client.crt",
"ClientKey": "../Certificates/client.key"

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();
});

View File

@@ -26,7 +26,7 @@ public class ChatRoomController(
FileService.FileServiceClient files,
FileReferenceService.FileReferenceServiceClient fileRefs,
ActionLogService.ActionLogServiceClient als,
PusherService.PusherServiceClient pusher,
RingService.RingServiceClient pusher,
AccountClientHelper accountsHelper
) : ControllerBase
{

View File

@@ -202,7 +202,7 @@ public partial class ChatService(
message.ChatRoom = room;
using var scope = scopeFactory.CreateScope();
var scopedNty = scope.ServiceProvider.GetRequiredService<PusherService.PusherServiceClient>();
var scopedNty = scope.ServiceProvider.GetRequiredService<RingService.RingServiceClient>();
var scopedCrs = scope.ServiceProvider.GetRequiredService<ChatRoomService>();
var members = await scopedCrs.ListRoomMembers(room.Id);

View File

@@ -6,8 +6,8 @@ using Grpc.Core;
namespace DysonNetwork.Sphere.Connection;
public class WebSocketHandlerGrpc(PusherService.PusherServiceClient pusher, ChatRoomService crs, ChatService cs)
: PusherHandlerService.PusherHandlerServiceBase
public class WebSocketHandlerGrpc(RingService.RingServiceClient pusher, ChatRoomService crs, ChatService cs)
: RingHandlerService.RingHandlerServiceBase
{
public override async Task<Empty> ReceiveWebSocketPacket(
ReceiveWebSocketPacketRequest request,

View File

@@ -25,7 +25,7 @@ public partial class PostService(
ILogger<PostService> logger,
FileService.FileServiceClient files,
FileReferenceService.FileReferenceServiceClient fileRefs,
PusherService.PusherServiceClient pusher,
RingService.RingServiceClient pusher,
PollService polls,
Publisher.PublisherService ps,
WebReaderService reader
@@ -165,7 +165,7 @@ public partial class PostService(
var sender = post.Publisher;
using var scope = factory.CreateScope();
var pub = scope.ServiceProvider.GetRequiredService<Publisher.PublisherService>();
var nty = scope.ServiceProvider.GetRequiredService<PusherService.PusherServiceClient>();
var nty = scope.ServiceProvider.GetRequiredService<RingService.RingServiceClient>();
var accounts = scope.ServiceProvider.GetRequiredService<AccountService.AccountServiceClient>();
try
{
@@ -534,7 +534,7 @@ public partial class PostService(
{
using var scope = factory.CreateScope();
var pub = scope.ServiceProvider.GetRequiredService<Publisher.PublisherService>();
var nty = scope.ServiceProvider.GetRequiredService<PusherService.PusherServiceClient>();
var nty = scope.ServiceProvider.GetRequiredService<RingService.RingServiceClient>();
var accounts = scope.ServiceProvider.GetRequiredService<AccountService.AccountServiceClient>();
try
{
@@ -937,7 +937,7 @@ public partial class PostService(
{
using var scope = factory.CreateScope();
var pub = scope.ServiceProvider.GetRequiredService<Publisher.PublisherService>();
var nty = scope.ServiceProvider.GetRequiredService<PusherService.PusherServiceClient>();
var nty = scope.ServiceProvider.GetRequiredService<RingService.RingServiceClient>();
var accounts = scope.ServiceProvider.GetRequiredService<AccountService.AccountServiceClient>();
var accountsHelper = scope.ServiceProvider.GetRequiredService<AccountClientHelper>();
try

View File

@@ -26,7 +26,7 @@ builder.Services.AddAppAuthentication();
builder.Services.AddAppSwagger();
builder.Services.AddDysonAuth();
builder.Services.AddAccountService();
builder.Services.AddPusherService();
builder.Services.AddRingService();
builder.Services.AddDriveService();
// Add flush handlers and websocket handlers

View File

@@ -13,7 +13,7 @@ public class PublisherSubscriptionService(
PostService ps,
IStringLocalizer<NotificationResource> localizer,
ICacheService cache,
PusherService.PusherServiceClient pusher,
RingService.RingServiceClient pusher,
AccountService.AccountServiceClient accounts
)
{

View File

@@ -10,7 +10,7 @@ namespace DysonNetwork.Sphere.Realm;
public class RealmService(
AppDatabase db,
PusherService.PusherServiceClient pusher,
RingService.RingServiceClient pusher,
AccountService.AccountServiceClient accounts,
IStringLocalizer<NotificationResource> localizer,
AccountClientHelper accountsHelper,

View File

@@ -12,7 +12,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DysonNetwork.Pass", "DysonN
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DysonNetwork.Shared", "DysonNetwork.Shared\DysonNetwork.Shared.csproj", "{DB46D1A6-79B4-43FC-A9A9-115CDA26947A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DysonNetwork.Pusher", "DysonNetwork.Pusher\DysonNetwork.Pusher.csproj", "{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DysonNetwork.Ring", "DysonNetwork.Ring\DysonNetwork.Ring.csproj", "{D5DAFB0D-487E-48EF-BA2F-C581C846F63B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DysonNetwork.Drive", "DysonNetwork.Drive\DysonNetwork.Drive.csproj", "{8DE0B783-8852-494D-B90A-201ABBB71202}"
EndProject

View File

@@ -57,15 +57,15 @@ services:
etcd:
condition: service_healthy
pusher:
image: xsheep2010/dyson-pusher:latest
ring:
image: xsheep2010/dyson-ring:latest
ports:
- "8003:8080"
environment:
- ConnectionStrings__Etcd=http://etcd:2379
- Etcd__Insecure=true
- Service__Name=DysonNetwork.Pusher
- Service__Url=http://pusher:8080
- Service__Name=DysonNetwork.Ring
- Service__Url=http://ring:8080
depends_on:
etcd:
condition: service_healthy