Merge branch 'master' of https://gitea.nxsir.cn/nanxun/IM_NEW
This commit is contained in:
@@ -2,25 +2,13 @@ FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/mcr.microsoft.com/dotnet/sdk:8.0 A
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY IM_API_NEW.sln ./
|
||||
|
||||
COPY ConnectorService/ConnectorService.csproj ConnectorService/
|
||||
|
||||
COPY IM.Commons/IM.Commons.csproj IM.Commons/
|
||||
COPY IM.InitCommon/IM.InitCommon.csproj IM.InitCommon/
|
||||
COPY IM.Protocols/IM.Protocols.csproj IM.Protocols/
|
||||
COPY IM.ASPNETCore/IM.ASPNETCore.csproj IM.ASPNETCore/
|
||||
COPY IM.Jwt/IM.Jwt.csproj IM.Jwt/
|
||||
COPY DomainCommons/IM.DomainCommons.csproj DomainCommons/
|
||||
|
||||
RUN dotnet restore ConnectorService/ConnectorService.csproj
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN find . -type d \( -name obj -o -name bin \) -prune -exec rm -rf {} + 2>/dev/null || true
|
||||
|
||||
RUN dotnet publish ConnectorService/ConnectorService.csproj \
|
||||
-c Release \
|
||||
-o /app/publish \
|
||||
--no-restore
|
||||
-o /app/publish
|
||||
|
||||
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using IM.Commons;
|
||||
using ConnectorService.Services;
|
||||
using IM.Commons;
|
||||
using IM.Protocols.Grpc.Conversation;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
@@ -9,6 +10,7 @@ namespace ConnectorService
|
||||
public void Initialize(IServiceCollection services)
|
||||
{
|
||||
services.AddRedisCache();
|
||||
services.AddScoped<IConversationIntergrationService, ConversationIntegrationService>();
|
||||
services.AddGrpcClient<ConversationInternal.ConversationInternalClient>((sp ,o) =>
|
||||
{
|
||||
var options = sp.GetRequiredService<IOptionsMonitor<GrpcOptions>>();
|
||||
|
||||
@@ -6,6 +6,12 @@ namespace ConnectorService.Services
|
||||
public class ConversationIntegrationService : IConversationIntergrationService
|
||||
{
|
||||
private readonly ConversationInternal.ConversationInternalClient client;
|
||||
|
||||
public ConversationIntegrationService(ConversationInternal.ConversationInternalClient client)
|
||||
{
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
public async Task<List<string>> GetUserStreamKeysAsync(Guid userId)
|
||||
{
|
||||
var req = new GetUserStreamKeysRequest()
|
||||
|
||||
Reference in New Issue
Block a user