DataPlaneSelfRegistration
@Component @ConditionalOnProperty( prefix = "builder.dataplane", name = "register-enabled", havingValue = "true", matchIfMissing = false) public class DataPlaneSelfRegistration implements ApplicationRunner
源码Source
io/agentscope/builder/control/DataPlaneSelfRegistration.java:42–191数据面自身注册,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.control 包,实现 ApplicationRunner。核心成员包括 run、heartbeat、shutdown、DataPlaneSelfRegistration。
Optionally self-registers this Java data plane with aistiod and heartbeats so the control plane
can poll /agentscope/* without Kubernetes discovery.
Disabled by default: the dataplane hosts Managed agent runs and should not appear as an Operate
agent. Enable with builder.dataplane.register-enabled=true / BUILDER_DATAPLANE_REGISTER=true when that Operate visibility is intentionally desired.
构造器摘要Constructor Summary
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void run(ApplicationArguments args) | 设置运行。 Performs the run operation. |
public void heartbeat() | 执行心跳相关操作。 Periodic heartbeat (and re-register if the control plane forgot us). |
public void shutdown() | 关闭资源并释放连接。 Releases resources and connections. |
构造器详情Constructor Detail
DataPlaneSelfRegistration
public DataPlaneSelfRegistration(ControlPlaneClient controlPlaneClient, String agentName, String namespace, String configuredInstanceId, String publicUrl, int serverPort, String internalToken)
初始化 DataPlaneSelfRegistration 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
controlPlaneClient | ControlPlaneClient | 控制面客户端(类型 `ControlPlaneClient`)。The control plane client. |
agentName | String | 智能体名称(类型 `String`)。The agent name. |
namespace | String | 命名空间(类型 `String`)。The namespace. |
configuredInstanceId | String | configured 实例标识(类型 `String`)。The configured instance id. |
publicUrl | String | public URL(类型 `String`)。The public url. |
serverPort | int | 服务端 Port(类型 `int`)。The server port. |
internalToken | String | 内部令牌(类型 `String`)。The internal token. |
源码Source
io/agentscope/builder/control/DataPlaneSelfRegistration.java:67–83方法详情Method Detail
run
public void run(ApplicationArguments args)
设置运行。
Performs the run operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
args | ApplicationArguments | 参数(类型 `ApplicationArguments`)。The args. |
源码Source
io/agentscope/builder/control/DataPlaneSelfRegistration.java:85–96heartbeat
public void heartbeat()
执行心跳相关操作。
Periodic heartbeat (and re-register if the control plane forgot us).
源码Source
io/agentscope/builder/control/DataPlaneSelfRegistration.java:99–121shutdown
public void shutdown()
关闭资源并释放连接。
Releases resources and connections.
源码Source
io/agentscope/builder/control/DataPlaneSelfRegistration.java:123–136