Skip to content

Commit be93dee

Browse files
committed
add e2b sdk
1 parent 419c26e commit be93dee

203 files changed

Lines changed: 74137 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

clients/java/pom.xml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,48 @@
200200
<version>${junit-version}</version>
201201
<scope>test</scope>
202202
</dependency>
203+
<!-- gRPC -->
204+
<dependency>
205+
<groupId>io.grpc</groupId>
206+
<artifactId>grpc-netty-shaded</artifactId>
207+
<version>${grpc.version}</version>
208+
</dependency>
209+
<dependency>
210+
<groupId>io.grpc</groupId>
211+
<artifactId>grpc-protobuf</artifactId>
212+
<version>${grpc.version}</version>
213+
</dependency>
214+
<dependency>
215+
<groupId>io.grpc</groupId>
216+
<artifactId>grpc-stub</artifactId>
217+
<version>${grpc.version}</version>
218+
</dependency>
219+
<dependency>
220+
<groupId>io.grpc</groupId>
221+
<artifactId>grpc-api</artifactId>
222+
<version>${grpc.version}</version>
223+
</dependency>
224+
<!-- Protobuf -->
225+
<dependency>
226+
<groupId>com.google.protobuf</groupId>
227+
<artifactId>protobuf-java</artifactId>
228+
<version>${protobuf.version}</version>
229+
</dependency>
230+
<dependency>
231+
<groupId>com.google.protobuf</groupId>
232+
<artifactId>protobuf-java-util</artifactId>
233+
<version>${protobuf.version}</version>
234+
</dependency>
235+
<dependency>
236+
<groupId>org.openapitools</groupId>
237+
<artifactId>jackson-databind-nullable</artifactId>
238+
<version>0.2.6</version>
239+
</dependency>
240+
<dependency>
241+
<groupId>javax.ws.rs</groupId>
242+
<artifactId>javax.ws.rs-api</artifactId>
243+
<version>2.1.1</version>
244+
</dependency>
203245
</dependencies>
204246

205247
<properties>
@@ -208,8 +250,10 @@
208250
<maven.compiler.source>${java.version}</maven.compiler.source>
209251
<maven.compiler.target>${java.version}</maven.compiler.target>
210252
<swagger-core-version>1.5.15</swagger-core-version>
211-
<gson-version>2.8.1</gson-version>
253+
<gson-version>2.10.1</gson-version>
212254
<jodatime-version>2.9.9</jodatime-version>
255+
<grpc.version>1.60.0</grpc.version>
256+
<protobuf.version>4.34.0</protobuf.version>
213257
<maven-plugin-version>1.0.0</maven-plugin-version>
214258
<junit-version>4.13.1</junit-version>
215259
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

clients/java/src/main/java/io/openkruise/agents/client/e2b/api/SandboxesApi.java

Lines changed: 2259 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* E2B API
3+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4+
*
5+
* The version of the OpenAPI document: 0.1.0
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package io.openkruise.agents.client.e2b.api.invoker;
15+
16+
import java.io.IOException;
17+
18+
import java.util.Map;
19+
import java.util.List;
20+
21+
/**
22+
* Callback for asynchronous API call.
23+
*
24+
* @param <T> The return type
25+
*/
26+
public interface ApiCallback<T> {
27+
/**
28+
* This is called when the API call fails.
29+
*
30+
* @param e The exception causing the failure
31+
* @param statusCode Status code of the response if available, otherwise it would be 0
32+
* @param responseHeaders Headers of the response if available, otherwise it would be null
33+
*/
34+
void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders);
35+
36+
/**
37+
* This is called when the API call succeeded.
38+
*
39+
* @param result The result deserialized from response
40+
* @param statusCode Status code of the response
41+
* @param responseHeaders Headers of the response
42+
*/
43+
void onSuccess(T result, int statusCode, Map<String, List<String>> responseHeaders);
44+
45+
/**
46+
* This is called when the API upload processing.
47+
*
48+
* @param bytesWritten bytes Written
49+
* @param contentLength content length of request body
50+
* @param done write end
51+
*/
52+
void onUploadProgress(long bytesWritten, long contentLength, boolean done);
53+
54+
/**
55+
* This is called when the API download processing.
56+
*
57+
* @param bytesRead bytes Read
58+
* @param contentLength content length of the response
59+
* @param done Read end
60+
*/
61+
void onDownloadProgress(long bytesRead, long contentLength, boolean done);
62+
}

0 commit comments

Comments
 (0)