Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add global control plane code #59

Merged
merged 5 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
echo "org.gradle.jvmargs=-Xmx4096m --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED" >> gradle.properties

- name: Execute Gradle build
run: gradle build
run: gradle clean build

- name: Build jar
run: gradle jar
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
echo "org.gradle.jvmargs=-Xmx4096m --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED" >> gradle.properties

- name: Execute Gradle build
run: gradle build
run: gradle clean build

- name: Run integration tests
run: gradle integrationTest
Expand Down
13 changes: 11 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ dependencies {
implementation 'org.slf4j:slf4j-api:2.0.5'
implementation 'com.google.api.grpc:proto-google-common-protos:2.14.3'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.14.2'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.14.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
implementation 'com.fasterxml.jackson.core:jackson-core:2.14.2'
implementation 'com.google.code.gson:gson:2.9.1'
implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'
implementation 'io.gsonfire:gson-fire:1.8.5'
implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
compileOnly "org.apache.tomcat:annotations-api:6.0.53" // necessary for Java 9+

testImplementation("com.squareup.okhttp3:mockwebserver:4.10.0")
Expand All @@ -61,6 +65,11 @@ dependencies {
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.0'
}

javadoc {
options.tags = [ "http.response.details:a:Http Response Details" ]
options.addStringOption('Xdoclint:none', '-quiet')
}

configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.pinecone.integration.controlPlane;
package io.pinecone.integration.controlPlane.index;

import io.pinecone.PineconeClientConfig;
import io.pinecone.integration.dataplane.PineconeClientLiveIntegTest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.pinecone.integration.controlPlane;
package io.pinecone.integration.controlPlane.index;

import io.pinecone.PineconeClientConfig;
import io.pinecone.PineconeIndexOperationClient;
Expand Down
60 changes: 60 additions & 0 deletions src/main/java/org/openapitools/client/ApiCallback.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Pineonce.io Public API
* Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors.
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


package org.openapitools.client;

import java.util.Map;
import java.util.List;

/**
* Callback for asynchronous API call.
*
* @param <T> The return type
*/
public interface ApiCallback<T> {
/**
* This is called when the API call fails.
*
* @param e The exception causing the failure
* @param statusCode Status code of the response if available, otherwise it would be 0
* @param responseHeaders Headers of the response if available, otherwise it would be null
*/
void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders);

/**
* This is called when the API call succeeded.
*
* @param result The result deserialized from response
* @param statusCode Status code of the response
* @param responseHeaders Headers of the response
*/
void onSuccess(T result, int statusCode, Map<String, List<String>> responseHeaders);

/**
* This is called when the API upload processing.
*
* @param bytesWritten bytes Written
* @param contentLength content length of request body
* @param done write end
*/
void onUploadProgress(long bytesWritten, long contentLength, boolean done);

/**
* This is called when the API download processing.
*
* @param bytesRead bytes Read
* @param contentLength content length of the response
* @param done Read end
*/
void onDownloadProgress(long bytesRead, long contentLength, boolean done);
}
Loading
Loading