NacosA2aRegistryAutoConfiguration
@AutoConfiguration(before = AgentscopeA2aAutoConfiguration.class) @EnableConfigurationProperties({NacosServerProperties.class, NacosA2aProperties.class}) @ConditionalOnClass(NacosAiService.class) @ConditionalOnProperty( prefix = Constants.NACOS_PREFIX, name = "enabled", havingValue = "true", matchIfMissing = true) public class NacosA2aRegistryAutoConfiguration
源码Source
io/agentscope/extensions/a2a/nacos/registry/NacosA2aRegistryAutoConfiguration.java:45–74Nacos A 2 a 注册表 Auto 配置,保存相关配置项。位于 io.agentscope.extensions.a2a.nacos.registry 包。核心成员包括 a2aService、nacosAgentRegistry。
The AutoConfiguration for A2A Nacos registry.
If Nacos Client and A2A Properties bean exist, will autoconfigure
AgentRegistry for Nacos A2A Registry.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public AiService a2aService(NacosServerProperties nacosServerProperties) throws NacosException | 设置a 2 a 服务。 Performs the a 2 a service operation. |
public AgentRegistry nacosAgentRegistry(AiService a2aService, NacosA2aProperties nacosA2aProperties) | 执行 `nacosAgentRegistry` 方法。 Performs the nacos agent registry operation. |
方法详情Method Detail
a2aService
public AiService a2aService(NacosServerProperties nacosServerProperties) throws NacosException
设置a 2 a 服务。
Performs the a 2 a service operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
nacosServerProperties | NacosServerProperties | Nacos 服务端属性(类型 `NacosServerProperties`)。The nacos server properties. |
AiService返回AiService。Returns ai service.
NacosException可能抛出 `NacosException`。Thrown when the operation cannot be completed.
源码Source
io/agentscope/extensions/a2a/nacos/registry/NacosA2aRegistryAutoConfiguration.java:55–59nacosAgentRegistry
public AgentRegistry nacosAgentRegistry(AiService a2aService, NacosA2aProperties nacosA2aProperties)
执行 nacosAgentRegistry 方法。
Performs the nacos agent registry operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
a2aService | AiService | a 2 a 服务(类型 `AiService`)。The a 2 a service. |
nacosA2aProperties | NacosA2aProperties | Nacos A 2 a 属性(类型 `NacosA2aProperties`)。The nacos a 2 a properties. |
AgentRegistry返回AgentRegistry。Returns agent registry.
源码Source
io/agentscope/extensions/a2a/nacos/registry/NacosA2aRegistryAutoConfiguration.java:61–66