AS AgentScopeAPI 手册 / API Reference

KubernetesSandboxClientOptions

public class KubernetesSandboxClientOptions extends SandboxClientOptions
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:24–194

Kubernetes 沙箱客户端选项,保存相关配置项。位于 io.agentscope.extensions.sandbox.kubernetes 包,继承自 SandboxClientOptions。核心成员包括 getType、createClient、getKubernetesClient、setKubernetesClient、getKubernetesConfig、setKubernetesConfig。

Options for KubernetesSandboxClient (agent-sandbox mode).

方法摘要Method Summary

方法Method说明Description
public String getType()
获取类型。
Returns the type.
public SandboxClient<? extends SandboxClientOptions> createClient()
创建客户端。
Creates the client.
public KubernetesClient getKubernetesClient()
获取 `getKubernetesClient`。
Returns the kubernetes client.
public void setKubernetesClient(KubernetesClient kubernetesClient)
设置 `setKubernetesClient`。
Sets the kubernetes client.
public Config getKubernetesConfig()
获取 `getKubernetesConfig`。
Returns the kubernetes config.
public void setKubernetesConfig(Config kubernetesConfig)
设置 `setKubernetesConfig`。
Sets the kubernetes config.
public String getNamespace()
获取命名空间。
Returns the namespace.
public void setNamespace(String namespace)
设置命名空间。
Sets the namespace.
public String getWarmPoolName()
获取 `getWarmPoolName`。
Returns the warm pool name.
public void setWarmPoolName(String warmPoolName)
设置 `setWarmPoolName`。
Sets the warm pool name.
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 String getApiUrl()
获取API URL。
Returns the api url.
public void setApiUrl(String apiUrl)
设置API URL。
Sets the api url.
public String getGatewayName()
获取网关名称。
Returns the gateway name.
public void setGatewayName(String gatewayName)
设置网关名称。
Sets the gateway name.
public String getGatewayNamespace()
获取网关命名空间。
Returns the gateway namespace.
public void setGatewayNamespace(String gatewayNamespace)
设置网关命名空间。
Sets the gateway namespace.
public String getGatewayScheme()
获取 `getGatewayScheme`。
Returns the gateway scheme.
public void setGatewayScheme(String gatewayScheme)
设置 `setGatewayScheme`。
Sets the gateway scheme.
public int getServerPort()
获取 `getServerPort`。
Returns the server port.
public void setServerPort(int serverPort)
设置 `setServerPort`。
Sets the server port.
public long getSandboxReadyTimeoutSeconds()
获取沙箱就绪超时秒。
Returns the sandbox ready timeout seconds.
public void setSandboxReadyTimeoutSeconds(long sandboxReadyTimeoutSeconds)
设置沙箱就绪超时秒。
Sets the sandbox ready timeout seconds.
public long getCleanupTimeoutSeconds()
获取 `getCleanupTimeoutSeconds`。
Returns the cleanup timeout seconds.
public void setCleanupTimeoutSeconds(long cleanupTimeoutSeconds)
设置 `setCleanupTimeoutSeconds`。
Sets the cleanup timeout seconds.
public long getRequestTimeoutSeconds()
获取请求超时秒。
Returns the request timeout seconds.
public void setRequestTimeoutSeconds(long requestTimeoutSeconds)
设置请求超时秒。
Sets the request timeout seconds.
public long getPerAttemptTimeoutSeconds()
获取每个尝试超时秒。
Returns the per attempt timeout seconds.
public void setPerAttemptTimeoutSeconds(long perAttemptTimeoutSeconds)
设置每个尝试超时秒。
Sets the per attempt timeout seconds.
public long getPortForwardTimeoutSeconds()
获取 `getPortForwardTimeoutSeconds`。
Returns the port forward timeout seconds.
public void setPortForwardTimeoutSeconds(long portForwardTimeoutSeconds)
设置 `setPortForwardTimeoutSeconds`。
Sets the port forward timeout seconds.

方法详情Method Detail

getType

public String getType()

获取类型。

Returns the type.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:57–60

createClient

public SandboxClient<? extends SandboxClientOptions> createClient()

创建客户端。

Creates the client.

返回Returns SandboxClient<? extends SandboxClientOptions>
返回SandboxClient。Returns sandbox client.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:62–65

getKubernetesClient

public KubernetesClient getKubernetesClient()

获取 getKubernetesClient。

Returns the kubernetes client.

返回Returns KubernetesClient
返回KubernetesClient。Returns kubernetes client.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:67–69

setKubernetesClient

public void setKubernetesClient(KubernetesClient kubernetesClient)

设置 setKubernetesClient。

Sets the kubernetes client.

参数Parameters
名称Name类型Type说明Description
kubernetesClientKubernetesClientKubernetes 客户端(类型 `KubernetesClient`)。The kubernetes client.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:71–73

getKubernetesConfig

public Config getKubernetesConfig()

获取 getKubernetesConfig。

Returns the kubernetes config.

返回Returns Config
返回配置。Returns config.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:75–77

setKubernetesConfig

public void setKubernetesConfig(Config kubernetesConfig)

设置 setKubernetesConfig。

Sets the kubernetes config.

参数Parameters
名称Name类型Type说明Description
kubernetesConfigConfigKubernetes 配置(类型 `Config`)。The kubernetes config.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:79–81

getNamespace

public String getNamespace()

获取命名空间。

Returns the namespace.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:83–85

setNamespace

public void setNamespace(String namespace)

设置命名空间。

Sets the namespace.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:87–89

getWarmPoolName

public String getWarmPoolName()

获取 getWarmPoolName。

Returns the warm pool name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:91–93

setWarmPoolName

public void setWarmPoolName(String warmPoolName)

设置 setWarmPoolName。

Sets the warm pool name.

参数Parameters
名称Name类型Type说明Description
warmPoolNameStringwarm 连接池名称(类型 `String`)。The warm pool name.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:95–97

getWorkspaceRoot

public String getWorkspaceRoot()

获取工作区根。

Returns the workspace root.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:99–101

setWorkspaceRoot

public void setWorkspaceRoot(String workspaceRoot)

设置工作区根。

Sets the workspace root.

参数Parameters
名称Name类型Type说明Description
workspaceRootString工作区根(类型 `String`)。The workspace root.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:103–105

getFileApiBaseDir

public String getFileApiBaseDir()

获取文件 API 基类目录。

Returns the file api base dir.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:107–109

setFileApiBaseDir

public void setFileApiBaseDir(String fileApiBaseDir)

设置文件 API 基类目录。

Sets the file api base dir.

参数Parameters
名称Name类型Type说明Description
fileApiBaseDirString文件 API 基类目录(类型 `String`)。The file api base dir.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:111–113

getApiUrl

public String getApiUrl()

获取API URL。

Returns the api url.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:115–117

setApiUrl

public void setApiUrl(String apiUrl)

设置API URL。

Sets the api url.

参数Parameters
名称Name类型Type说明Description
apiUrlStringAPI URL(类型 `String`)。The api url.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:119–121

getGatewayName

public String getGatewayName()

获取网关名称。

Returns the gateway name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:123–125

setGatewayName

public void setGatewayName(String gatewayName)

设置网关名称。

Sets the gateway name.

参数Parameters
名称Name类型Type说明Description
gatewayNameString网关名称(类型 `String`)。The gateway name.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:127–129

getGatewayNamespace

public String getGatewayNamespace()

获取网关命名空间。

Returns the gateway namespace.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:131–133

setGatewayNamespace

public void setGatewayNamespace(String gatewayNamespace)

设置网关命名空间。

Sets the gateway namespace.

参数Parameters
名称Name类型Type说明Description
gatewayNamespaceString网关命名空间(类型 `String`)。The gateway namespace.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:135–137

getGatewayScheme

public String getGatewayScheme()

获取 getGatewayScheme。

Returns the gateway scheme.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:139–141

setGatewayScheme

public void setGatewayScheme(String gatewayScheme)

设置 setGatewayScheme。

Sets the gateway scheme.

参数Parameters
名称Name类型Type说明Description
gatewaySchemeString网关 Scheme(类型 `String`)。The gateway scheme.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:143–145

getServerPort

public int getServerPort()

获取 getServerPort。

Returns the server port.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:147–149

setServerPort

public void setServerPort(int serverPort)

设置 setServerPort。

Sets the server port.

参数Parameters
名称Name类型Type说明Description
serverPortint服务端 Port(类型 `int`)。The server port.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:151–153

getSandboxReadyTimeoutSeconds

public long getSandboxReadyTimeoutSeconds()

获取沙箱就绪超时秒。

Returns the sandbox ready timeout seconds.

返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:155–157

setSandboxReadyTimeoutSeconds

public void setSandboxReadyTimeoutSeconds(long sandboxReadyTimeoutSeconds)

设置沙箱就绪超时秒。

Sets the sandbox ready timeout seconds.

参数Parameters
名称Name类型Type说明Description
sandboxReadyTimeoutSecondslong沙箱就绪超时秒(类型 `long`)。The sandbox ready timeout seconds.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:159–161

getCleanupTimeoutSeconds

public long getCleanupTimeoutSeconds()

获取 getCleanupTimeoutSeconds。

Returns the cleanup timeout seconds.

返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:163–165

setCleanupTimeoutSeconds

public void setCleanupTimeoutSeconds(long cleanupTimeoutSeconds)

设置 setCleanupTimeoutSeconds。

Sets the cleanup timeout seconds.

参数Parameters
名称Name类型Type说明Description
cleanupTimeoutSecondslongcleanup 超时秒(类型 `long`)。The cleanup timeout seconds.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:167–169

getRequestTimeoutSeconds

public long getRequestTimeoutSeconds()

获取请求超时秒。

Returns the request timeout seconds.

返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:171–173

setRequestTimeoutSeconds

public void setRequestTimeoutSeconds(long requestTimeoutSeconds)

设置请求超时秒。

Sets the request timeout seconds.

参数Parameters
名称Name类型Type说明Description
requestTimeoutSecondslong请求超时秒(类型 `long`)。The request timeout seconds.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:175–177

getPerAttemptTimeoutSeconds

public long getPerAttemptTimeoutSeconds()

获取每个尝试超时秒。

Returns the per attempt timeout seconds.

返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:179–181

setPerAttemptTimeoutSeconds

public void setPerAttemptTimeoutSeconds(long perAttemptTimeoutSeconds)

设置每个尝试超时秒。

Sets the per attempt timeout seconds.

参数Parameters
名称Name类型Type说明Description
perAttemptTimeoutSecondslong每个尝试超时秒(类型 `long`)。The per attempt timeout seconds.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:183–185

getPortForwardTimeoutSeconds

public long getPortForwardTimeoutSeconds()

获取 getPortForwardTimeoutSeconds。

Returns the port forward timeout seconds.

返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:187–189

setPortForwardTimeoutSeconds

public void setPortForwardTimeoutSeconds(long portForwardTimeoutSeconds)

设置 setPortForwardTimeoutSeconds。

Sets the port forward timeout seconds.

参数Parameters
名称Name类型Type说明Description
portForwardTimeoutSecondslongport Forward 超时秒(类型 `long`)。The port forward timeout seconds.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesSandboxClientOptions.java:191–193
基于官方固定版本源码静态生成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.