Skip to content

rm netcoreapp31 and some changes #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Nacos.AspNetCore/Nacos.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="../../build/version.props" />

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<PackageId>nacos-sdk-csharp.AspNetCore</PackageId>
<VersionPrefix>$(NugetVersion)</VersionPrefix>
<VersionSuffix></VersionSuffix>
Expand All @@ -14,7 +14,7 @@
<ProjectUrl>https://github.com/nacos-group/nacos-sdk-csharp</ProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>
<PackageReleaseNotes>
</PackageReleaseNotes>
</PropertyGroup>

Expand Down
6 changes: 6 additions & 0 deletions src/Nacos/V2/Remote/GRpc/GrpcClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ private CommonResponse ServerCheck(Grpc.Net.Client.GrpcChannel channel)
{
try
{
if (request is SetupAckRequest)
{
// there is no connection ready this time
return;
}

var response = HandleServerRequest(request);
response.RequestId = request.RequestId;
await call.RequestStream.WriteAsync(GrpcUtils.Convert(response)).ConfigureAwait(false);
Expand Down
6 changes: 6 additions & 0 deletions src/Nacos/V2/Remote/RemoteRequestType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public static class RemoteRequestType

public static readonly string Req_ServerCheck = "ServerCheckRequest";

public static readonly string Req_SetupAck = "SetupAckRequest";

public static readonly string Req_Config_ReSync = "ConfigReSyncRequest";

public static readonly string Resp_Config_Pubish_Alpha2 = "ConfigPublishResponse";
Expand Down Expand Up @@ -68,6 +70,8 @@ public static class RemoteRequestType

public static readonly string Resp_ServerCheck = "ServerCheckResponse";

public static readonly string Resp_SetupAck = "SetupAckResponse";

public static readonly string Req_PushAck = "PushAckRequest";

public static readonly string Req_ConnectReset = "ConnectResetRequest";
Expand Down Expand Up @@ -113,6 +117,8 @@ public static class RemoteRequestType
{ Resp_Naming_NotifySubscriber, typeof(NotifySubscriberResponse) },
{ Req_Naming_BatchInstance, typeof(BatchInstanceRequest) },
{ Resp_Naming_BatchInstance, typeof(BatchInstanceResponse) },
{ Req_SetupAck, typeof(SetupAckRequest) },
{ Resp_SetupAck, typeof(SetupAckResponse) },
};
}
}
11 changes: 11 additions & 0 deletions src/Nacos/V2/Remote/Requests/SetupAckRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Nacos.V2.Remote.Requests
{
using System.Collections.Generic;

public class SetupAckRequest : CommonRequest
{
public Dictionary<string, bool> AbilityTable { get; set; }

public override string GetRemoteType() => RemoteRequestType.Req_SetupAck;
}
}
7 changes: 7 additions & 0 deletions src/Nacos/V2/Remote/Responses/SetupAckResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Nacos.V2.Remote.Responses
{
public class SetupAckResponse : CommonResponse
{
public override string GetRemoteType() => RemoteRequestType.Resp_SetupAck;
}
}
Loading