AS AgentScopeAPI 手册 / API Reference

KubernetesFilesystemSpec

public class KubernetesFilesystemSpec extends SandboxFilesystemSpec
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:26–118

Kubernetes 文件系统规格,在隔离环境中安全执行代码和工具。位于 io.agentscope.extensions.sandbox.kubernetes 包,继承自 SandboxFilesystemSpec。核心成员包括 client、kubernetesClient、namespace、warmPoolName、workspaceRoot、fileApiBaseDir。

SandboxFilesystemSpec for the agent-sandbox backed Kubernetes sandbox store.

方法摘要Method Summary

方法Method说明Description
public KubernetesFilesystemSpec client(SandboxClient<?> client)
设置客户端。
Performs the client operation.
public KubernetesFilesystemSpec kubernetesClient(io.fabric8.kubernetes.client.KubernetesClient kc)
设置该参数。
Performs the kubernetes client operation.
public KubernetesFilesystemSpec namespace(String namespace)
设置命名空间。
Performs the namespace operation.
public KubernetesFilesystemSpec warmPoolName(String warmPoolName)
设置该参数。
Performs the warm pool name operation.
public KubernetesFilesystemSpec workspaceRoot(String workspaceRoot)
设置工作区根。
Performs the workspace root operation.
public KubernetesFilesystemSpec fileApiBaseDir(String fileApiBaseDir)
设置文件 API 基类目录。
Performs the file api base dir operation.
public KubernetesFilesystemSpec apiUrl(String apiUrl)
设置API URL。
Performs the api url operation.
public KubernetesFilesystemSpec gatewayName(String gatewayName)
设置网关名称。
Performs the gateway name operation.
public KubernetesFilesystemSpec gatewayNamespace(String gatewayNamespace)
设置网关命名空间。
Performs the gateway namespace operation.
public KubernetesFilesystemSpec gatewayScheme(String gatewayScheme)
设置该参数。
Performs the gateway scheme operation.
public KubernetesFilesystemSpec serverPort(int serverPort)
设置该参数。
Performs the server port operation.
public KubernetesFilesystemSpec snapshotSpec(SandboxSnapshotSpec snapshotSpec)
设置快照规格。
Performs the snapshot spec operation.
public KubernetesFilesystemSpec workspaceSpec(WorkspaceSpec workspaceSpec)
设置工作区规格。
Performs the workspace spec operation.
protected SandboxClient<?> createClient()
创建客户端。
Creates the client.
protected SandboxClientOptions clientOptions()
返回客户端选项。
Returns the client options.
protected SandboxSnapshotSpec snapshotSpec()
返回快照规格。
Returns the snapshot spec.
protected WorkspaceSpec workspaceSpec()
返回工作区规格。
Returns the workspace spec.

方法详情Method Detail

client

public KubernetesFilesystemSpec client(SandboxClient<?> client)

设置客户端。

Performs the client operation.

参数Parameters
名称Name类型Type说明Description
clientSandboxClient<?>客户端(类型 `SandboxClient`)。The client.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:33–36

kubernetesClient

public KubernetesFilesystemSpec kubernetesClient(io.fabric8.kubernetes.client.KubernetesClient kc)

设置该参数。

Performs the kubernetes client operation.

参数Parameters
名称Name类型Type说明Description
kcio.fabric8.kubernetes.client.KubernetesClientkc(类型 `io.fabric8.kubernetes.client.KubernetesClient`)。The kc.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:38–42

namespace

public KubernetesFilesystemSpec namespace(String namespace)

设置命名空间。

Performs the namespace operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:44–47

warmPoolName

public KubernetesFilesystemSpec warmPoolName(String warmPoolName)

设置该参数。

Performs the warm pool name operation.

参数Parameters
名称Name类型Type说明Description
warmPoolNameStringwarm 连接池名称(类型 `String`)。The warm pool name.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:49–52

workspaceRoot

public KubernetesFilesystemSpec workspaceRoot(String workspaceRoot)

设置工作区根。

Performs the workspace root operation.

参数Parameters
名称Name类型Type说明Description
workspaceRootString工作区根(类型 `String`)。The workspace root.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:54–57

fileApiBaseDir

public KubernetesFilesystemSpec fileApiBaseDir(String fileApiBaseDir)

设置文件 API 基类目录。

Performs the file api base dir operation.

参数Parameters
名称Name类型Type说明Description
fileApiBaseDirString文件 API 基类目录(类型 `String`)。The file api base dir.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:59–62

apiUrl

public KubernetesFilesystemSpec apiUrl(String apiUrl)

设置API URL。

Performs the api url operation.

参数Parameters
名称Name类型Type说明Description
apiUrlStringAPI URL(类型 `String`)。The api url.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:64–67

gatewayName

public KubernetesFilesystemSpec gatewayName(String gatewayName)

设置网关名称。

Performs the gateway name operation.

参数Parameters
名称Name类型Type说明Description
gatewayNameString网关名称(类型 `String`)。The gateway name.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:69–72

gatewayNamespace

public KubernetesFilesystemSpec gatewayNamespace(String gatewayNamespace)

设置网关命名空间。

Performs the gateway namespace operation.

参数Parameters
名称Name类型Type说明Description
gatewayNamespaceString网关命名空间(类型 `String`)。The gateway namespace.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:74–77

gatewayScheme

public KubernetesFilesystemSpec gatewayScheme(String gatewayScheme)

设置该参数。

Performs the gateway scheme operation.

参数Parameters
名称Name类型Type说明Description
gatewaySchemeString网关 Scheme(类型 `String`)。The gateway scheme.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:79–82

serverPort

public KubernetesFilesystemSpec serverPort(int serverPort)

设置该参数。

Performs the server port operation.

参数Parameters
名称Name类型Type说明Description
serverPortint服务端 Port(类型 `int`)。The server port.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:84–87

snapshotSpec

public KubernetesFilesystemSpec snapshotSpec(SandboxSnapshotSpec snapshotSpec)

设置快照规格。

Performs the snapshot spec operation.

参数Parameters
名称Name类型Type说明Description
snapshotSpecSandboxSnapshotSpec快照规格(类型 `SandboxSnapshotSpec`)。The snapshot spec.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:89–92

workspaceSpec

public KubernetesFilesystemSpec workspaceSpec(WorkspaceSpec workspaceSpec)

设置工作区规格。

Performs the workspace spec operation.

参数Parameters
名称Name类型Type说明Description
workspaceSpecWorkspaceSpec工作区规格(类型 `WorkspaceSpec`)。The workspace spec.
返回Returns KubernetesFilesystemSpec
返回KubernetesFilesystemSpec。Returns kubernetes filesystem spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:94–97

createClient

protected SandboxClient<?> createClient()

创建客户端。

Creates the client.

返回Returns SandboxClient<?>
返回SandboxClient。Returns sandbox client.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:99–102

clientOptions

protected SandboxClientOptions clientOptions()

返回客户端选项。

Returns the client options.

返回Returns SandboxClientOptions
返回SandboxClientOptions。Returns sandbox client options.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:104–107

snapshotSpec

protected SandboxSnapshotSpec snapshotSpec()

返回快照规格。

Returns the snapshot spec.

返回Returns SandboxSnapshotSpec
返回SandboxSnapshotSpec。Returns sandbox snapshot spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:109–112

workspaceSpec

protected WorkspaceSpec workspaceSpec()

返回工作区规格。

Returns the workspace spec.

返回Returns WorkspaceSpec
返回WorkspaceSpec。Returns workspace spec.
源码Source io/agentscope/extensions/sandbox/kubernetes/KubernetesFilesystemSpec.java:114–117

继承成员Inherited Members

基于官方固定版本源码静态生成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.