MCPcopy Create free account
hub / github.com/astercloud/aster / NewRemoteSandbox

Function NewRemoteSandbox

pkg/sandbox/remote.go:143–164  ·  view source on GitHub ↗

NewRemoteSandbox 创建远程沙箱

(config *RemoteSandboxConfig)

Source from the content-addressed store, hash-verified

141
142// NewRemoteSandbox 创建远程沙箱
143func NewRemoteSandbox(config *RemoteSandboxConfig) (*RemoteSandbox, error) {
144 client := NewRemoteClient(&RemoteClientConfig{
145 BaseURL: config.BaseURL,
146 APIKey: config.APIKey,
147 APISecret: config.APISecret,
148 Timeout: config.Timeout,
149 })
150
151 rs := &RemoteSandbox{
152 config: config,
153 client: client,
154 workDir: config.WorkDir,
155 properties: config.Properties,
156 }
157
158 rs.fs = &RemoteFS{
159 sandbox: rs,
160 workDir: config.WorkDir,
161 }
162
163 return rs, nil
164}
165
166// Kind 返回沙箱类型
167func (rs *RemoteSandbox) Kind() string {

Callers 3

NewAliyunSandboxFunction · 0.92
NewVolcengineSandboxFunction · 0.92
CreateMethod · 0.85

Calls 1

NewRemoteClientFunction · 0.85

Tested by

no test coverage detected