You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by rd...@apache.org on 2018/07/12 23:00:55 UTC
[incubator-pulsar] branch master updated: add list-connector rest
api at workers (#2146)
This is an automated email from the ASF dual-hosted git repository.
rdhabalia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new d43bf87 add list-connector rest api at workers (#2146)
d43bf87 is described below
commit d43bf87f9f3a31cb7f4c06ec08b643da53ac20f7
Author: Rajan Dhabalia <rd...@apache.org>
AuthorDate: Thu Jul 12 16:00:52 2018 -0700
add list-connector rest api at workers (#2146)
---
.../pulsar/functions/worker/rest/api/v2/FunctionApiV2Resource.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/v2/FunctionApiV2Resource.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/v2/FunctionApiV2Resource.java
index c382bd6..9c71f05 100644
--- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/v2/FunctionApiV2Resource.java
+++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/v2/FunctionApiV2Resource.java
@@ -22,6 +22,8 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.pulsar.functions.worker.rest.FunctionApiResource;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
+import org.apache.pulsar.common.io.ConnectorDefinition;
+import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@@ -158,4 +160,9 @@ public class FunctionApiV2Resource extends FunctionApiResource {
return functions.downloadFunction(path);
}
+ @GET
+ @Path("/connectors")
+ public List<ConnectorDefinition> getConnectorsList() throws IOException {
+ return functions.getListOfConnectors();
+ }
}