KubernetesSandboxState
public class KubernetesSandboxState extends SandboxState
io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:21–110Kubernetes 沙箱状态,在隔离环境中安全执行代码和工具。位于 io.agentscope.extensions.sandbox.kubernetes 包,继承自 SandboxState。核心成员包括 getNamespace、setNamespace、getClaimName、setClaimName、getSandboxName、setSandboxName。
Serializable state for an agent-sandbox-backed Kubernetes sandbox.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getNamespace() | 获取命名空间。 Returns the namespace. |
public void setNamespace(String namespace) | 设置命名空间。 Sets the namespace. |
public String getClaimName() | 获取 `getClaimName`。 Returns the claim name. |
public void setClaimName(String claimName) | 设置 `setClaimName`。 Sets the claim name. |
public String getSandboxName() | 获取沙箱名称。 Returns the sandbox name. |
public void setSandboxName(String sandboxName) | 设置沙箱名称。 Sets the sandbox name. |
public String getWarmPoolName() | 获取 `getWarmPoolName`。 Returns the warm pool name. |
public void setWarmPoolName(String warmPoolName) | 设置 `setWarmPoolName`。 Sets the warm pool name. |
public String getPodName() | 获取 `getPodName`。 Returns the pod name. |
public void setPodName(String podName) | 设置 `setPodName`。 Sets the pod name. |
public String getPodIP() | 获取 `getPodIP`。 Returns the pod IP. |
public void setPodIP(String podIP) | 设置 `setPodIP`。 Sets the pod IP. |
public String getWorkspaceRoot() | 获取工作区根。 Returns the workspace root. |
public void setWorkspaceRoot(String workspaceRoot) | 设置工作区根。 Sets the workspace root. |
public String getFileApiBaseDir() | 获取文件 API 基类目录。 Returns the file api base dir. |
public void setFileApiBaseDir(String fileApiBaseDir) | 设置文件 API 基类目录。 Sets the file api base dir. |
public boolean isClaimOwned() | 判断是否 `isClaimOwned`。 Returns whether the claim owned. |
public void setClaimOwned(boolean claimOwned) | 设置 `setClaimOwned`。 Sets the claim owned. |
方法详情Method Detail
getNamespace
public String getNamespace()
获取命名空间。
Returns the namespace.
Stringio/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:39–41setNamespace
public void setNamespace(String namespace)
设置命名空间。
Sets the namespace.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
namespace | String | 命名空间(类型 `String`)。The namespace. |
io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:43–45getClaimName
public String getClaimName()
获取 getClaimName。
Returns the claim name.
Stringio/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:47–49setClaimName
public void setClaimName(String claimName)
设置 setClaimName。
Sets the claim name.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
claimName | String | claim 名称(类型 `String`)。The claim name. |
io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:51–53getSandboxName
public String getSandboxName()
获取沙箱名称。
Returns the sandbox name.
Stringio/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:55–57setSandboxName
public void setSandboxName(String sandboxName)
设置沙箱名称。
Sets the sandbox name.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxName | String | 沙箱名称(类型 `String`)。The sandbox name. |
io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:59–61getWarmPoolName
public String getWarmPoolName()
获取 getWarmPoolName。
Returns the warm pool name.
Stringio/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:63–65setWarmPoolName
public void setWarmPoolName(String warmPoolName)
设置 setWarmPoolName。
Sets the warm pool name.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
warmPoolName | String | warm 连接池名称(类型 `String`)。The warm pool name. |
io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:67–69getPodName
public String getPodName()
获取 getPodName。
Returns the pod name.
Stringio/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:71–73setPodName
public void setPodName(String podName)
设置 setPodName。
Sets the pod name.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
podName | String | pod 名称(类型 `String`)。The pod name. |
io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:75–77getPodIP
public String getPodIP()
获取 getPodIP。
Returns the pod IP.
Stringio/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:79–81setPodIP
public void setPodIP(String podIP)
设置 setPodIP。
Sets the pod IP.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
podIP | String | pod IP(类型 `String`)。The pod IP. |
io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:83–85getWorkspaceRoot
public String getWorkspaceRoot()
获取工作区根。
Returns the workspace root.
Stringio/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:87–89setWorkspaceRoot
public void setWorkspaceRoot(String workspaceRoot)
设置工作区根。
Sets the workspace root.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workspaceRoot | String | 工作区根(类型 `String`)。The workspace root. |
io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:91–93getFileApiBaseDir
public String getFileApiBaseDir()
获取文件 API 基类目录。
Returns the file api base dir.
Stringio/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:95–97setFileApiBaseDir
public void setFileApiBaseDir(String fileApiBaseDir)
设置文件 API 基类目录。
Sets the file api base dir.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
fileApiBaseDir | String | 文件 API 基类目录(类型 `String`)。The file api base dir. |
io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:99–101isClaimOwned
public boolean isClaimOwned()
判断是否 isClaimOwned。
Returns whether the claim owned.
booleanio/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:103–105setClaimOwned
public void setClaimOwned(boolean claimOwned)
设置 setClaimOwned。
Sets the claim owned.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
claimOwned | boolean | claim Owned(类型 `boolean`)。The claim owned. |
io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxState.java:107–109