AS AgentScopeAPI 手册 / API Reference

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

构造器Constructor说明Description
public DataPlaneSelfRegistration(ControlPlaneClient controlPlaneClient, String agentName, String namespace, String configuredInstanceId, String publicUrl, int serverPort, String internalToken)
初始化 `DataPlaneSelfRegistration` 实例。
Creates a new instance.

方法摘要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
controlPlaneClientControlPlaneClient控制面客户端(类型 `ControlPlaneClient`)。The control plane client.
agentNameString智能体名称(类型 `String`)。The agent name.
namespaceString命名空间(类型 `String`)。The namespace.
configuredInstanceIdStringconfigured 实例标识(类型 `String`)。The configured instance id.
publicUrlStringpublic URL(类型 `String`)。The public url.
serverPortint服务端 Port(类型 `int`)。The server port.
internalTokenString内部令牌(类型 `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
argsApplicationArguments参数(类型 `ApplicationArguments`)。The args.
源码Source io/agentscope/builder/control/DataPlaneSelfRegistration.java:85–96

heartbeat

public void heartbeat()

执行心跳相关操作。

Periodic heartbeat (and re-register if the control plane forgot us).

源码Source io/agentscope/builder/control/DataPlaneSelfRegistration.java:99–121

shutdown

public void shutdown()

关闭资源并释放连接。

Releases resources and connections.

源码Source io/agentscope/builder/control/DataPlaneSelfRegistration.java:123–136
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.