VOOZH about

URL: https://www.nuget.org/packages/Galosys.Foundation.Yarp.NacosNaming/

⇱ NuGet Gallery | Galosys.Foundation.Yarp.NacosNaming 26.5.20.1




Galosys.Foundation.Yarp.NacosNaming 26.5.20.1

dotnet add package Galosys.Foundation.Yarp.NacosNaming --version 26.5.20.1
 
 
NuGet\Install-Package Galosys.Foundation.Yarp.NacosNaming -Version 26.5.20.1
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Galosys.Foundation.Yarp.NacosNaming" Version="26.5.20.1" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Galosys.Foundation.Yarp.NacosNaming" Version="26.5.20.1" />
 
Directory.Packages.props
<PackageReference Include="Galosys.Foundation.Yarp.NacosNaming" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Galosys.Foundation.Yarp.NacosNaming --version 26.5.20.1
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Galosys.Foundation.Yarp.NacosNaming, 26.5.20.1"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Galosys.Foundation.Yarp.NacosNaming@26.5.20.1
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Galosys.Foundation.Yarp.NacosNaming&version=26.5.20.1
 
Install as a Cake Addin
#tool nuget:?package=Galosys.Foundation.Yarp.NacosNaming&version=26.5.20.1
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Galosys.Foundation.Yarp.NacosNaming

基于 Nacos Naming 的 YARP 配置提供者,自动从 Nacos 注册中心获取服务实例并生成路由配置。

成熟度: 🟡 可用 — 功能完整,测试或文档可能不完善

安装

dotnet add package Galosys.Foundation.Yarp.NacosNaming

最小化配置

appsettings.json 中配置 Nacos:

{
 "NacosNaming": {
 "ServerAddresses": ["http://nacos:8848"],
 "GroupName": "DEFAULT_GROUP"
 }
}

模块会自动注册 NacosNamingConfigProvider,从 Nacos 获取所有服务实例并生成 YARP 路由和集群配置。

工作原理

  1. 通过 INacosNamingService.GetServicesOfServer() 获取指定分组下的所有服务
  2. 对每个服务调用 GetAllInstances() 获取健康实例 URL
  3. 自动生成路由(/{serviceName}/{**catch-all})和集群配置(RoundRobin 负载均衡)

配合配置刷新

配合 Galosys.Foundation.Yarp 的分布式配置刷新机制,服务上下线后可通过 RabbitMQ 广播或轮询降级自动更新路由。

Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Galosys.Foundation.Yarp.NacosNaming:

Package Downloads
Galosys.Gateway.App

Galosys.Foundation快速开发库

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
26.5.20.1 104 5/20/2026
26.5.19.1 93 5/19/2026
26.5.18.1 98 5/18/2026
26.5.15.1 97 5/15/2026
26.5.12.3 93 5/12/2026
26.4.27.1-rc1 96 4/26/2026
26.4.25.1-rc1 90 4/25/2026
26.4.22.2-rc7 94 4/22/2026
26.4.22.2-rc6 87 4/22/2026
26.4.22.2-rc4 93 4/22/2026
26.4.22.2-rc3 89 4/22/2026
26.4.19.1-rc1 98 4/19/2026
26.4.12.8-rc1 102 4/12/2026
26.4.12.7-rc1 95 4/12/2026
26.1.30.1-rc1 146 1/30/2026
26.1.29.1 141 1/29/2026
26.1.28.5 149 1/28/2026
26.1.28.4 141 1/28/2026
26.1.28.2 142 1/28/2026
26.1.23.6 129 1/23/2026
Loading failed