mirror of https://github.com/dapr/java-sdk.git
Merge pull request #18 from artursouza/kick-off
Repackaging + fixing samples
This commit is contained in:
commit
48556cbefd
|
@ -1,6 +1,16 @@
|
|||
# IDE generated files and directories
|
||||
*.iml
|
||||
.idea/
|
||||
|
||||
# Output folders
|
||||
**/target/
|
||||
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Proto meta
|
||||
*.pb.meta
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
|
@ -21,3 +31,6 @@
|
|||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
# Some other generated folders/files
|
||||
components/
|
||||
|
|
25
README.md
25
README.md
|
@ -5,22 +5,29 @@ This is the Dapr SDK for Java, based on the auto-generated proto client.<br>
|
|||
For more info on Dapr and gRPC, visit [this link](https://github.com/dapr/docs/tree/master/howto/create-grpc-app).
|
||||
|
||||
### Installing
|
||||
|
||||
Clone this repository including the submodules:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/dapr/java-sdk.git
|
||||
```
|
||||
|
||||
Then head over to build the Maven project:
|
||||
|
||||
```sh
|
||||
# make sure you are in the `java-sdk` directory.
|
||||
mvn package install
|
||||
mvn install
|
||||
```
|
||||
|
||||
### Running an example
|
||||
```sh
|
||||
cd examples/
|
||||
mvn compile
|
||||
dapr run --protocol grpc --grpc-port 50001 -- mvn exec:java -Dexec.mainClass=io.dapr.examples.Example
|
||||
dapr run --protocol grpc --grpc-port 50001 -- mvn exec:java -pl examples -Dexec.mainClass=io.dapr.examples.Example
|
||||
```
|
||||
|
||||
### Creating and publishing the artifacts to Nexus Repository
|
||||
From the root directory:
|
||||
|
||||
```
|
||||
```sh
|
||||
mvn package
|
||||
mvn deploy:deploy-file -DgeneratePom=false -DrepositoryId=nexus -Durl=http://localhost:8081/repository/maven-releases -DpomFile=pom.xml -Dfile=target/client-0.1.0-preview.jar
|
||||
```
|
||||
|
@ -29,3 +36,11 @@ For more documentation reference :
|
|||
https://maven.apache.org/plugins/maven-deploy-plugin
|
||||
|
||||
https://help.sonatype.com/repomanager3/user-interface/uploading-components
|
||||
|
||||
### Maven Module version management
|
||||
To increase the version of all modules and pom files, run the following commands:
|
||||
|
||||
```sh
|
||||
mvn versions:set -DnewVersion="0.1.0-preview02"
|
||||
mvn versions:commit
|
||||
```
|
||||
|
|
|
@ -1,65 +1,31 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<project
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>examples</artifactId>
|
||||
|
||||
<parent>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-parent</artifactId>
|
||||
<version>0.3.0-alpha</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dapr-sdk-examples</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.1.0-preview01</version>
|
||||
<name>dapr-client</name>
|
||||
<url>https://dapr.io</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.24.0</grpc.version>
|
||||
<protobuf.version>3.10.0</protobuf.version>
|
||||
<protoc.version>3.10.0</protoc.version>
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-bom</artifactId>
|
||||
<version>${grpc.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<version>0.3.0-alpha</version>
|
||||
<name>dapr-sdk-examples</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20190722</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>client</artifactId>
|
||||
<version>0.1.0-preview01</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-protobuf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-stub</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java-util</artifactId>
|
||||
<version>${protobuf.version}</version>
|
||||
<artifactId>dapr-sdk</artifactId>
|
||||
<version>0.3.0-alpha</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
</extensions>
|
||||
<plugins>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -2,27 +2,21 @@ package io.dapr.examples;
|
|||
|
||||
import com.google.protobuf.Any;
|
||||
import com.google.protobuf.ByteString;
|
||||
|
||||
import io.dapr.DaprGrpc;
|
||||
import io.dapr.DaprGrpc.DaprBlockingStub;
|
||||
import io.dapr.DaprProtos.DeleteStateEnvelope;
|
||||
import io.dapr.DaprProtos.GetStateEnvelope;
|
||||
import io.dapr.DaprProtos.GetStateResponseEnvelope;
|
||||
import io.dapr.DaprProtos.PublishEventEnvelope;
|
||||
import io.dapr.DaprProtos.SaveStateEnvelope;
|
||||
import io.dapr.DaprProtos.StateRequest;
|
||||
import io.dapr.DaprProtos.*;
|
||||
import io.grpc.ManagedChannel;
|
||||
import io.grpc.ManagedChannelBuilder;
|
||||
|
||||
/**
|
||||
* Simple example, to run:
|
||||
* mvn compile
|
||||
* dapr run --grpc-port 50001 -- mvn exec:java -Dexec.mainClass=io.dapr.examples.Example
|
||||
* mvn clean install
|
||||
* dapr run --grpc-port 50001 -- mvn exec:java -pl=examples -Dexec.mainClass=io.dapr.examples.Example
|
||||
*/
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ManagedChannel channel =
|
||||
ManagedChannelBuilder.forAddress("localhost", 50001).usePlaintext().build();
|
||||
ManagedChannelBuilder.forAddress("localhost", 50001).usePlaintext().build();
|
||||
DaprBlockingStub client = DaprGrpc.newBlockingStub(channel);
|
||||
|
||||
Any data = Any.newBuilder().setValue(ByteString.copyFromUtf8("foo")).build();
|
||||
|
@ -31,12 +25,12 @@ public class Example {
|
|||
|
||||
String key = "mykey";
|
||||
StateRequest req = StateRequest.newBuilder()
|
||||
.setKey(key)
|
||||
.setValue(Any.newBuilder().setValue(ByteString.copyFromUtf8("my value")).build())
|
||||
.build();
|
||||
.setKey(key)
|
||||
.setValue(Any.newBuilder().setValue(ByteString.copyFromUtf8("my value")).build())
|
||||
.build();
|
||||
SaveStateEnvelope state = SaveStateEnvelope.newBuilder()
|
||||
.addRequests(req)
|
||||
.build();
|
||||
.addRequests(req)
|
||||
.build();
|
||||
client.saveState(state);
|
||||
System.out.println("Saved!");
|
||||
|
||||
|
@ -46,4 +40,4 @@ public class Example {
|
|||
client.deleteState(DeleteStateEnvelope.newBuilder().setKey(key).build());
|
||||
System.out.println("Deleted!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,143 @@
|
|||
package io.dapr.examples;
|
||||
|
||||
import com.sun.net.httpserver.HttpExchange;
|
||||
import com.sun.net.httpserver.HttpServer;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.URI;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpClient.Redirect;
|
||||
import java.net.http.HttpClient.Version;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpRequest.BodyPublishers;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.net.http.HttpResponse.BodyHandlers;
|
||||
import java.nio.charset.Charset;
|
||||
import java.time.Duration;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import static java.lang.System.out;
|
||||
|
||||
/**
|
||||
* OrderManager web app.
|
||||
*
|
||||
* Based on the helloworld Node.js example in https://github.com/dapr/samples/blob/master/1.hello-world/app.js
|
||||
*
|
||||
* To install jars into your local maven repo:
|
||||
* mvn clean install
|
||||
*
|
||||
* To run (after step above):
|
||||
* dapr run --app-id orderapp --app-port 3000 --port 3500 -- mvn exec:java -pl=examples -Dexec.mainClass=io.dapr.examples.OrderManager
|
||||
*
|
||||
* If this class changes, run this before running it again:
|
||||
* mvn compile
|
||||
*/
|
||||
public class OrderManager {
|
||||
|
||||
static HttpClient httpClient;
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
int httpPort = 3000;
|
||||
String daprPort = Optional.ofNullable(System.getenv("DAPR_HTTP_PORT")).orElse("3500");
|
||||
String stateUrl = String.format("http://localhost:%s/v1.0/state", daprPort);
|
||||
HttpServer httpServer = HttpServer.create(new InetSocketAddress(httpPort), 0);
|
||||
|
||||
httpClient = HttpClient.newBuilder().version(Version.HTTP_1_1).followRedirects(Redirect.NORMAL)
|
||||
.connectTimeout(Duration.ofSeconds(2)).build();
|
||||
|
||||
httpServer.createContext("/order").setHandler(e -> {
|
||||
out.println("Fetching order!");
|
||||
fetch(stateUrl + "/order").thenAccept(response -> {
|
||||
int resCode = response.statusCode() == 200 ? 200 : 500;
|
||||
String body = response.statusCode() == 200 ? response.body() : "Could not get state.";
|
||||
|
||||
try {
|
||||
e.sendResponseHeaders(resCode, body.getBytes().length);
|
||||
OutputStream os = e.getResponseBody();
|
||||
try {
|
||||
os.write(body.getBytes());
|
||||
} finally {
|
||||
os.close();
|
||||
}
|
||||
} catch (IOException ioerror) {
|
||||
out.println(ioerror);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
httpServer.createContext("/neworder").setHandler(e -> {
|
||||
try {
|
||||
out.println("Received new order ...");
|
||||
String json = readBody(e);
|
||||
JSONObject jsonObject = new JSONObject(json);
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
String orderId = data.getString("orderId");
|
||||
out.printf("Got a new order! Order ID: %s\n", orderId);
|
||||
|
||||
JSONObject item = new JSONObject();
|
||||
item.put("key", "order");
|
||||
item.put("value", data);
|
||||
JSONArray state = new JSONArray();
|
||||
state.put(item);
|
||||
out.printf("Writing to state: %s\n", state.toString());
|
||||
|
||||
post(stateUrl, state.toString()).thenAccept(response -> {
|
||||
int resCode = response.statusCode() == 200 ? 200 : 500;
|
||||
String body = response.body();
|
||||
try {
|
||||
e.sendResponseHeaders(resCode, body.getBytes().length);
|
||||
OutputStream os = e.getResponseBody();
|
||||
try {
|
||||
os.write(body.getBytes());
|
||||
} finally {
|
||||
os.close();
|
||||
}
|
||||
} catch (IOException ioerror) {
|
||||
out.println(ioerror);
|
||||
}
|
||||
});
|
||||
} catch (IOException ioerror) {
|
||||
out.println(ioerror);
|
||||
}
|
||||
});
|
||||
|
||||
httpServer.start();
|
||||
out.printf("Java App listening on port %s.", httpPort);
|
||||
}
|
||||
|
||||
private static CompletableFuture<HttpResponse<String>> fetch(String url) {
|
||||
HttpRequest request = HttpRequest.newBuilder().uri(URI.create(url)).build();
|
||||
return httpClient.sendAsync(request, BodyHandlers.ofString());
|
||||
}
|
||||
|
||||
private static CompletableFuture<HttpResponse<String>> post(String url, String body) {
|
||||
HttpRequest request = HttpRequest.newBuilder().uri(URI.create(url))
|
||||
.header("Content-Type", "application/json; charset=UTF-8").POST(BodyPublishers.ofString(body)).build();
|
||||
|
||||
return httpClient.sendAsync(request, BodyHandlers.ofString());
|
||||
}
|
||||
|
||||
private static String readBody(HttpExchange t) throws IOException {
|
||||
// retrieve the request json data
|
||||
InputStream is = t.getRequestBody();
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
byte[] buffer = new byte[1024];
|
||||
int len;
|
||||
try {
|
||||
while ((len = is.read(buffer)) > 0)
|
||||
bos.write(buffer, 0, len);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
bos.close();
|
||||
}
|
||||
return new String(bos.toByteArray(), Charset.forName("UTF-8"));
|
||||
}
|
||||
}
|
159
pom.xml
159
pom.xml
|
@ -1,14 +1,59 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<project
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>client</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.1.0-preview01</version>
|
||||
<name>dapr-client</name>
|
||||
<description>gRPC client for Dapr.</description>
|
||||
<artifactId>dapr-sdk-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>0.3.0-alpha</version>
|
||||
<name>dapr-sdk-parent</name>
|
||||
<description>SDK for Dapr.</description>
|
||||
<url>https://dapr.io</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.25.0</grpc.version>
|
||||
<protobuf.version>3.11.0</protobuf.version>
|
||||
<protoc.version>3.10.0</protoc.version>
|
||||
<os-maven-plugin.version>1.6.2</os-maven-plugin.version>
|
||||
<maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
|
||||
<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-bom</artifactId>
|
||||
<version>${grpc.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>MIT License</name>
|
||||
|
@ -31,101 +76,9 @@
|
|||
<url>http://github.com/dapr/java-sdk</url>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.24.0</grpc.version>
|
||||
<protobuf.version>3.10.0</protobuf.version>
|
||||
<protoc.version>3.10.0</protoc.version>
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
</properties>
|
||||
<modules>
|
||||
<module>sdk</module>
|
||||
<module>examples</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-bom</artifactId>
|
||||
<version>${grpc.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-netty-shaded</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-protobuf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-stub</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-testing</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java-util</artifactId>
|
||||
<version>${protobuf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>2.25.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,106 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package dapr;
|
||||
|
||||
import "google/protobuf/any.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
|
||||
option java_outer_classname = "DaprProtos";
|
||||
option java_package = "io.dapr";
|
||||
|
||||
option csharp_namespace = "Dapr.Client.Grpc";
|
||||
|
||||
|
||||
// Dapr definitions
|
||||
service Dapr {
|
||||
rpc PublishEvent(PublishEventEnvelope) returns (google.protobuf.Empty) {}
|
||||
rpc InvokeService(InvokeServiceEnvelope) returns (InvokeServiceResponseEnvelope) {}
|
||||
rpc InvokeBinding(InvokeBindingEnvelope) returns (google.protobuf.Empty) {}
|
||||
rpc GetState(GetStateEnvelope) returns (GetStateResponseEnvelope) {}
|
||||
rpc SaveState(SaveStateEnvelope) returns (google.protobuf.Empty) {}
|
||||
rpc DeleteState(DeleteStateEnvelope) returns (google.protobuf.Empty) {}
|
||||
}
|
||||
|
||||
message InvokeServiceResponseEnvelope {
|
||||
google.protobuf.Any data = 1;
|
||||
map<string,string> metadata = 2;
|
||||
}
|
||||
|
||||
message DeleteStateEnvelope {
|
||||
string key = 1;
|
||||
string etag = 2;
|
||||
StateOptions options = 3;
|
||||
}
|
||||
|
||||
message SaveStateEnvelope {
|
||||
repeated StateRequest requests = 1;
|
||||
}
|
||||
|
||||
message GetStateEnvelope {
|
||||
string key = 1;
|
||||
string consistency = 2;
|
||||
}
|
||||
|
||||
message GetStateResponseEnvelope {
|
||||
google.protobuf.Any data = 1;
|
||||
string etag = 2;
|
||||
}
|
||||
|
||||
message InvokeBindingEnvelope {
|
||||
string name = 1;
|
||||
google.protobuf.Any data = 2;
|
||||
map<string,string> metadata = 3;
|
||||
}
|
||||
|
||||
message InvokeServiceEnvelope {
|
||||
string id = 1;
|
||||
string method = 2;
|
||||
google.protobuf.Any data = 3;
|
||||
map<string,string> metadata = 4;
|
||||
}
|
||||
|
||||
message PublishEventEnvelope {
|
||||
string topic = 1;
|
||||
google.protobuf.Any data = 2;
|
||||
}
|
||||
|
||||
message State {
|
||||
string key = 1;
|
||||
google.protobuf.Any value = 2;
|
||||
string etag = 3;
|
||||
map<string,string> metadata = 4;
|
||||
StateOptions options = 5;
|
||||
}
|
||||
|
||||
message StateOptions {
|
||||
string concurrency = 1;
|
||||
string consistency = 2;
|
||||
RetryPolicy retryPolicy = 3;
|
||||
}
|
||||
|
||||
message RetryPolicy {
|
||||
int32 threshold = 1;
|
||||
string pattern = 2;
|
||||
google.protobuf.Duration interval = 3;
|
||||
}
|
||||
|
||||
message StateRequest {
|
||||
string key = 1;
|
||||
google.protobuf.Any value = 2;
|
||||
string etag = 3;
|
||||
map<string,string> metadata = 4;
|
||||
StateRequestOptions options = 5;
|
||||
}
|
||||
|
||||
message StateRequestOptions {
|
||||
string concurrency = 1;
|
||||
string consistency = 2;
|
||||
StateRetryPolicy retryPolicy = 3;
|
||||
}
|
||||
|
||||
message StateRetryPolicy {
|
||||
int32 threshold = 1;
|
||||
string pattern = 2;
|
||||
google.protobuf.Duration interval = 3;
|
||||
}
|
|
@ -0,0 +1,818 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: daprclient.proto
|
||||
|
||||
package daprclient
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
any "github.com/golang/protobuf/ptypes/any"
|
||||
duration "github.com/golang/protobuf/ptypes/duration"
|
||||
empty "github.com/golang/protobuf/ptypes/empty"
|
||||
grpc "google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type CloudEventEnvelope struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
|
||||
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
|
||||
SpecVersion string `protobuf:"bytes,4,opt,name=specVersion,proto3" json:"specVersion,omitempty"`
|
||||
DataContentType string `protobuf:"bytes,5,opt,name=dataContentType,proto3" json:"dataContentType,omitempty"`
|
||||
Topic string `protobuf:"bytes,6,opt,name=topic,proto3" json:"topic,omitempty"`
|
||||
Data *any.Any `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CloudEventEnvelope) Reset() { *m = CloudEventEnvelope{} }
|
||||
func (m *CloudEventEnvelope) String() string { return proto.CompactTextString(m) }
|
||||
func (*CloudEventEnvelope) ProtoMessage() {}
|
||||
func (*CloudEventEnvelope) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_127d5244029ccc8f, []int{0}
|
||||
}
|
||||
|
||||
func (m *CloudEventEnvelope) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CloudEventEnvelope.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CloudEventEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CloudEventEnvelope.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CloudEventEnvelope) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CloudEventEnvelope.Merge(m, src)
|
||||
}
|
||||
func (m *CloudEventEnvelope) XXX_Size() int {
|
||||
return xxx_messageInfo_CloudEventEnvelope.Size(m)
|
||||
}
|
||||
func (m *CloudEventEnvelope) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CloudEventEnvelope.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CloudEventEnvelope proto.InternalMessageInfo
|
||||
|
||||
func (m *CloudEventEnvelope) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CloudEventEnvelope) GetSource() string {
|
||||
if m != nil {
|
||||
return m.Source
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CloudEventEnvelope) GetType() string {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CloudEventEnvelope) GetSpecVersion() string {
|
||||
if m != nil {
|
||||
return m.SpecVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CloudEventEnvelope) GetDataContentType() string {
|
||||
if m != nil {
|
||||
return m.DataContentType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CloudEventEnvelope) GetTopic() string {
|
||||
if m != nil {
|
||||
return m.Topic
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CloudEventEnvelope) GetData() *any.Any {
|
||||
if m != nil {
|
||||
return m.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type BindingEventEnvelope struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Data *any.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
||||
Metadata map[string]string `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BindingEventEnvelope) Reset() { *m = BindingEventEnvelope{} }
|
||||
func (m *BindingEventEnvelope) String() string { return proto.CompactTextString(m) }
|
||||
func (*BindingEventEnvelope) ProtoMessage() {}
|
||||
func (*BindingEventEnvelope) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_127d5244029ccc8f, []int{1}
|
||||
}
|
||||
|
||||
func (m *BindingEventEnvelope) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BindingEventEnvelope.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BindingEventEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BindingEventEnvelope.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *BindingEventEnvelope) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BindingEventEnvelope.Merge(m, src)
|
||||
}
|
||||
func (m *BindingEventEnvelope) XXX_Size() int {
|
||||
return xxx_messageInfo_BindingEventEnvelope.Size(m)
|
||||
}
|
||||
func (m *BindingEventEnvelope) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BindingEventEnvelope.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BindingEventEnvelope proto.InternalMessageInfo
|
||||
|
||||
func (m *BindingEventEnvelope) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *BindingEventEnvelope) GetData() *any.Any {
|
||||
if m != nil {
|
||||
return m.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BindingEventEnvelope) GetMetadata() map[string]string {
|
||||
if m != nil {
|
||||
return m.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type BindingResponseEnvelope struct {
|
||||
Data *any.Any `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
||||
To []string `protobuf:"bytes,2,rep,name=to,proto3" json:"to,omitempty"`
|
||||
State []*State `protobuf:"bytes,3,rep,name=state,proto3" json:"state,omitempty"`
|
||||
Concurrency string `protobuf:"bytes,4,opt,name=concurrency,proto3" json:"concurrency,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BindingResponseEnvelope) Reset() { *m = BindingResponseEnvelope{} }
|
||||
func (m *BindingResponseEnvelope) String() string { return proto.CompactTextString(m) }
|
||||
func (*BindingResponseEnvelope) ProtoMessage() {}
|
||||
func (*BindingResponseEnvelope) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_127d5244029ccc8f, []int{2}
|
||||
}
|
||||
|
||||
func (m *BindingResponseEnvelope) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BindingResponseEnvelope.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BindingResponseEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BindingResponseEnvelope.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *BindingResponseEnvelope) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BindingResponseEnvelope.Merge(m, src)
|
||||
}
|
||||
func (m *BindingResponseEnvelope) XXX_Size() int {
|
||||
return xxx_messageInfo_BindingResponseEnvelope.Size(m)
|
||||
}
|
||||
func (m *BindingResponseEnvelope) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BindingResponseEnvelope.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BindingResponseEnvelope proto.InternalMessageInfo
|
||||
|
||||
func (m *BindingResponseEnvelope) GetData() *any.Any {
|
||||
if m != nil {
|
||||
return m.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BindingResponseEnvelope) GetTo() []string {
|
||||
if m != nil {
|
||||
return m.To
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BindingResponseEnvelope) GetState() []*State {
|
||||
if m != nil {
|
||||
return m.State
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BindingResponseEnvelope) GetConcurrency() string {
|
||||
if m != nil {
|
||||
return m.Concurrency
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type InvokeEnvelope struct {
|
||||
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
|
||||
Data *any.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
||||
Metadata map[string]string `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *InvokeEnvelope) Reset() { *m = InvokeEnvelope{} }
|
||||
func (m *InvokeEnvelope) String() string { return proto.CompactTextString(m) }
|
||||
func (*InvokeEnvelope) ProtoMessage() {}
|
||||
func (*InvokeEnvelope) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_127d5244029ccc8f, []int{3}
|
||||
}
|
||||
|
||||
func (m *InvokeEnvelope) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InvokeEnvelope.Unmarshal(m, b)
|
||||
}
|
||||
func (m *InvokeEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_InvokeEnvelope.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *InvokeEnvelope) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_InvokeEnvelope.Merge(m, src)
|
||||
}
|
||||
func (m *InvokeEnvelope) XXX_Size() int {
|
||||
return xxx_messageInfo_InvokeEnvelope.Size(m)
|
||||
}
|
||||
func (m *InvokeEnvelope) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_InvokeEnvelope.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_InvokeEnvelope proto.InternalMessageInfo
|
||||
|
||||
func (m *InvokeEnvelope) GetMethod() string {
|
||||
if m != nil {
|
||||
return m.Method
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *InvokeEnvelope) GetData() *any.Any {
|
||||
if m != nil {
|
||||
return m.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *InvokeEnvelope) GetMetadata() map[string]string {
|
||||
if m != nil {
|
||||
return m.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetTopicSubscriptionsEnvelope struct {
|
||||
Topics []string `protobuf:"bytes,1,rep,name=topics,proto3" json:"topics,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GetTopicSubscriptionsEnvelope) Reset() { *m = GetTopicSubscriptionsEnvelope{} }
|
||||
func (m *GetTopicSubscriptionsEnvelope) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetTopicSubscriptionsEnvelope) ProtoMessage() {}
|
||||
func (*GetTopicSubscriptionsEnvelope) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_127d5244029ccc8f, []int{4}
|
||||
}
|
||||
|
||||
func (m *GetTopicSubscriptionsEnvelope) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetTopicSubscriptionsEnvelope.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GetTopicSubscriptionsEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GetTopicSubscriptionsEnvelope.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *GetTopicSubscriptionsEnvelope) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GetTopicSubscriptionsEnvelope.Merge(m, src)
|
||||
}
|
||||
func (m *GetTopicSubscriptionsEnvelope) XXX_Size() int {
|
||||
return xxx_messageInfo_GetTopicSubscriptionsEnvelope.Size(m)
|
||||
}
|
||||
func (m *GetTopicSubscriptionsEnvelope) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GetTopicSubscriptionsEnvelope.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GetTopicSubscriptionsEnvelope proto.InternalMessageInfo
|
||||
|
||||
func (m *GetTopicSubscriptionsEnvelope) GetTopics() []string {
|
||||
if m != nil {
|
||||
return m.Topics
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetBindingsSubscriptionsEnvelope struct {
|
||||
Bindings []string `protobuf:"bytes,1,rep,name=bindings,proto3" json:"bindings,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GetBindingsSubscriptionsEnvelope) Reset() { *m = GetBindingsSubscriptionsEnvelope{} }
|
||||
func (m *GetBindingsSubscriptionsEnvelope) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetBindingsSubscriptionsEnvelope) ProtoMessage() {}
|
||||
func (*GetBindingsSubscriptionsEnvelope) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_127d5244029ccc8f, []int{5}
|
||||
}
|
||||
|
||||
func (m *GetBindingsSubscriptionsEnvelope) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetBindingsSubscriptionsEnvelope.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GetBindingsSubscriptionsEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GetBindingsSubscriptionsEnvelope.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *GetBindingsSubscriptionsEnvelope) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GetBindingsSubscriptionsEnvelope.Merge(m, src)
|
||||
}
|
||||
func (m *GetBindingsSubscriptionsEnvelope) XXX_Size() int {
|
||||
return xxx_messageInfo_GetBindingsSubscriptionsEnvelope.Size(m)
|
||||
}
|
||||
func (m *GetBindingsSubscriptionsEnvelope) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GetBindingsSubscriptionsEnvelope.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GetBindingsSubscriptionsEnvelope proto.InternalMessageInfo
|
||||
|
||||
func (m *GetBindingsSubscriptionsEnvelope) GetBindings() []string {
|
||||
if m != nil {
|
||||
return m.Bindings
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type State struct {
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value *any.Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
Etag string `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"`
|
||||
Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Options *StateOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *State) Reset() { *m = State{} }
|
||||
func (m *State) String() string { return proto.CompactTextString(m) }
|
||||
func (*State) ProtoMessage() {}
|
||||
func (*State) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_127d5244029ccc8f, []int{6}
|
||||
}
|
||||
|
||||
func (m *State) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_State.Unmarshal(m, b)
|
||||
}
|
||||
func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_State.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *State) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_State.Merge(m, src)
|
||||
}
|
||||
func (m *State) XXX_Size() int {
|
||||
return xxx_messageInfo_State.Size(m)
|
||||
}
|
||||
func (m *State) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_State.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_State proto.InternalMessageInfo
|
||||
|
||||
func (m *State) GetKey() string {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *State) GetValue() *any.Any {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *State) GetEtag() string {
|
||||
if m != nil {
|
||||
return m.Etag
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *State) GetMetadata() map[string]string {
|
||||
if m != nil {
|
||||
return m.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *State) GetOptions() *StateOptions {
|
||||
if m != nil {
|
||||
return m.Options
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type StateOptions struct {
|
||||
Concurrency string `protobuf:"bytes,1,opt,name=concurrency,proto3" json:"concurrency,omitempty"`
|
||||
Consistency string `protobuf:"bytes,2,opt,name=consistency,proto3" json:"consistency,omitempty"`
|
||||
RetryPolicy *RetryPolicy `protobuf:"bytes,3,opt,name=retryPolicy,proto3" json:"retryPolicy,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *StateOptions) Reset() { *m = StateOptions{} }
|
||||
func (m *StateOptions) String() string { return proto.CompactTextString(m) }
|
||||
func (*StateOptions) ProtoMessage() {}
|
||||
func (*StateOptions) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_127d5244029ccc8f, []int{7}
|
||||
}
|
||||
|
||||
func (m *StateOptions) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_StateOptions.Unmarshal(m, b)
|
||||
}
|
||||
func (m *StateOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_StateOptions.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *StateOptions) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_StateOptions.Merge(m, src)
|
||||
}
|
||||
func (m *StateOptions) XXX_Size() int {
|
||||
return xxx_messageInfo_StateOptions.Size(m)
|
||||
}
|
||||
func (m *StateOptions) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_StateOptions.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_StateOptions proto.InternalMessageInfo
|
||||
|
||||
func (m *StateOptions) GetConcurrency() string {
|
||||
if m != nil {
|
||||
return m.Concurrency
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *StateOptions) GetConsistency() string {
|
||||
if m != nil {
|
||||
return m.Consistency
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *StateOptions) GetRetryPolicy() *RetryPolicy {
|
||||
if m != nil {
|
||||
return m.RetryPolicy
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type RetryPolicy struct {
|
||||
Threshold int32 `protobuf:"varint,1,opt,name=threshold,proto3" json:"threshold,omitempty"`
|
||||
Pattern string `protobuf:"bytes,2,opt,name=pattern,proto3" json:"pattern,omitempty"`
|
||||
Interval *duration.Duration `protobuf:"bytes,3,opt,name=interval,proto3" json:"interval,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RetryPolicy) Reset() { *m = RetryPolicy{} }
|
||||
func (m *RetryPolicy) String() string { return proto.CompactTextString(m) }
|
||||
func (*RetryPolicy) ProtoMessage() {}
|
||||
func (*RetryPolicy) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_127d5244029ccc8f, []int{8}
|
||||
}
|
||||
|
||||
func (m *RetryPolicy) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RetryPolicy.Unmarshal(m, b)
|
||||
}
|
||||
func (m *RetryPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_RetryPolicy.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *RetryPolicy) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_RetryPolicy.Merge(m, src)
|
||||
}
|
||||
func (m *RetryPolicy) XXX_Size() int {
|
||||
return xxx_messageInfo_RetryPolicy.Size(m)
|
||||
}
|
||||
func (m *RetryPolicy) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_RetryPolicy.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_RetryPolicy proto.InternalMessageInfo
|
||||
|
||||
func (m *RetryPolicy) GetThreshold() int32 {
|
||||
if m != nil {
|
||||
return m.Threshold
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *RetryPolicy) GetPattern() string {
|
||||
if m != nil {
|
||||
return m.Pattern
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *RetryPolicy) GetInterval() *duration.Duration {
|
||||
if m != nil {
|
||||
return m.Interval
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CloudEventEnvelope)(nil), "daprclient.CloudEventEnvelope")
|
||||
proto.RegisterType((*BindingEventEnvelope)(nil), "daprclient.BindingEventEnvelope")
|
||||
proto.RegisterMapType((map[string]string)(nil), "daprclient.BindingEventEnvelope.MetadataEntry")
|
||||
proto.RegisterType((*BindingResponseEnvelope)(nil), "daprclient.BindingResponseEnvelope")
|
||||
proto.RegisterType((*InvokeEnvelope)(nil), "daprclient.InvokeEnvelope")
|
||||
proto.RegisterMapType((map[string]string)(nil), "daprclient.InvokeEnvelope.MetadataEntry")
|
||||
proto.RegisterType((*GetTopicSubscriptionsEnvelope)(nil), "daprclient.GetTopicSubscriptionsEnvelope")
|
||||
proto.RegisterType((*GetBindingsSubscriptionsEnvelope)(nil), "daprclient.GetBindingsSubscriptionsEnvelope")
|
||||
proto.RegisterType((*State)(nil), "daprclient.State")
|
||||
proto.RegisterMapType((map[string]string)(nil), "daprclient.State.MetadataEntry")
|
||||
proto.RegisterType((*StateOptions)(nil), "daprclient.StateOptions")
|
||||
proto.RegisterType((*RetryPolicy)(nil), "daprclient.RetryPolicy")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("daprclient.proto", fileDescriptor_127d5244029ccc8f) }
|
||||
|
||||
var fileDescriptor_127d5244029ccc8f = []byte{
|
||||
// 745 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xdd, 0x6e, 0xd3, 0x4a,
|
||||
0x10, 0x8e, 0x9d, 0x9f, 0xa6, 0x93, 0x9e, 0x9c, 0x9e, 0x51, 0x4f, 0xeb, 0x1a, 0x28, 0x91, 0xb9,
|
||||
0x20, 0x20, 0x94, 0x4a, 0x41, 0x88, 0x9f, 0x4a, 0x95, 0xa0, 0x8d, 0x0a, 0x48, 0x28, 0xc8, 0xad,
|
||||
0x90, 0x90, 0xb8, 0x71, 0x9c, 0x25, 0xb5, 0xea, 0xec, 0x5a, 0xeb, 0x4d, 0x24, 0x4b, 0xdc, 0x73,
|
||||
0xc5, 0x2b, 0xf0, 0x12, 0x3c, 0x0b, 0x77, 0xf0, 0x2e, 0xc8, 0xeb, 0x75, 0xb2, 0x8d, 0x93, 0x56,
|
||||
0x08, 0x71, 0xe7, 0x9d, 0xef, 0x9b, 0x9d, 0xf9, 0xe6, 0x67, 0x0d, 0x9b, 0x43, 0x2f, 0xe2, 0x7e,
|
||||
0x18, 0x10, 0x2a, 0x3a, 0x11, 0x67, 0x82, 0x21, 0xcc, 0x2d, 0xf6, 0xee, 0x88, 0xb1, 0x51, 0x48,
|
||||
0xf6, 0x25, 0x32, 0x98, 0x7c, 0xdc, 0xf7, 0x68, 0x92, 0xd1, 0xec, 0x1b, 0x8b, 0x10, 0x19, 0x47,
|
||||
0x22, 0x07, 0xf7, 0x16, 0xc1, 0xe1, 0x84, 0x7b, 0x22, 0x60, 0x34, 0xc3, 0x9d, 0x1f, 0x06, 0xe0,
|
||||
0x51, 0xc8, 0x26, 0xc3, 0xde, 0x94, 0x50, 0xd1, 0xa3, 0x53, 0x12, 0xb2, 0x88, 0x60, 0x13, 0xcc,
|
||||
0x60, 0x68, 0x19, 0x2d, 0xa3, 0xbd, 0xee, 0x9a, 0xc1, 0x10, 0xb7, 0xa1, 0x16, 0xb3, 0x09, 0xf7,
|
||||
0x89, 0x65, 0x4a, 0x9b, 0x3a, 0x21, 0x42, 0x45, 0x24, 0x11, 0xb1, 0xca, 0xd2, 0x2a, 0xbf, 0xb1,
|
||||
0x05, 0x8d, 0x38, 0x22, 0xfe, 0x3b, 0xc2, 0xe3, 0x80, 0x51, 0xab, 0x22, 0x21, 0xdd, 0x84, 0x6d,
|
||||
0xf8, 0x77, 0xe8, 0x09, 0xef, 0x88, 0x51, 0x41, 0xa8, 0x38, 0x4b, 0x2f, 0xa8, 0x4a, 0xd6, 0xa2,
|
||||
0x19, 0xb7, 0xa0, 0x2a, 0x58, 0x14, 0xf8, 0x56, 0x4d, 0xe2, 0xd9, 0x01, 0xdb, 0x50, 0x49, 0x89,
|
||||
0xd6, 0x5a, 0xcb, 0x68, 0x37, 0xba, 0x5b, 0x9d, 0x4c, 0x63, 0x27, 0xd7, 0xd8, 0x79, 0x4e, 0x13,
|
||||
0x57, 0x32, 0x9c, 0x9f, 0x06, 0x6c, 0xbd, 0x08, 0xe8, 0x30, 0xa0, 0xa3, 0xcb, 0x02, 0x11, 0x2a,
|
||||
0xd4, 0x1b, 0x13, 0x25, 0x51, 0x7e, 0xcf, 0xae, 0x35, 0xaf, 0xbb, 0x16, 0x5f, 0x43, 0x7d, 0x4c,
|
||||
0x84, 0x27, 0xd9, 0xe5, 0x56, 0xb9, 0xdd, 0xe8, 0x76, 0x3a, 0x5a, 0xfb, 0x96, 0x45, 0xec, 0xbc,
|
||||
0x51, 0x0e, 0x3d, 0x2a, 0x78, 0xe2, 0xce, 0xfc, 0xed, 0x03, 0xf8, 0xe7, 0x12, 0x84, 0x9b, 0x50,
|
||||
0xbe, 0x20, 0x89, 0xca, 0x2c, 0xfd, 0x4c, 0xab, 0x30, 0xf5, 0xc2, 0x49, 0x5e, 0xfc, 0xec, 0xf0,
|
||||
0xcc, 0x7c, 0x62, 0x38, 0x5f, 0x0d, 0xd8, 0x51, 0xd1, 0x5c, 0x12, 0x47, 0x8c, 0xc6, 0x64, 0x26,
|
||||
0x31, 0x97, 0x63, 0x5c, 0x2b, 0xa7, 0x09, 0xa6, 0x60, 0x96, 0xd9, 0x2a, 0xa7, 0xdd, 0x16, 0x0c,
|
||||
0xef, 0x42, 0x35, 0x16, 0x9e, 0x20, 0x4a, 0xdb, 0x7f, 0xba, 0xb6, 0xd3, 0x14, 0x70, 0x33, 0x3c,
|
||||
0x6d, 0xb5, 0xcf, 0xa8, 0x3f, 0xe1, 0x9c, 0x50, 0x3f, 0xc9, 0x5b, 0xad, 0x99, 0x9c, 0xef, 0x06,
|
||||
0x34, 0x5f, 0xd1, 0x29, 0xbb, 0x98, 0xe7, 0xb5, 0x0d, 0xb5, 0x31, 0x11, 0xe7, 0x2c, 0x9f, 0x2f,
|
||||
0x75, 0xfa, 0x8d, 0xf2, 0x1f, 0x17, 0xca, 0xdf, 0xd6, 0x53, 0xbc, 0x1c, 0xef, 0xef, 0x14, 0xfe,
|
||||
0x31, 0xdc, 0x3a, 0x21, 0xe2, 0x2c, 0x1d, 0xc7, 0xd3, 0xc9, 0x20, 0xf6, 0x79, 0x10, 0xa5, 0x5b,
|
||||
0x15, 0xeb, 0x2a, 0xe5, 0xb0, 0xc6, 0x96, 0x21, 0xeb, 0xaa, 0x4e, 0xce, 0x21, 0xb4, 0x4e, 0x88,
|
||||
0x50, 0x3d, 0x8b, 0x97, 0xfb, 0xda, 0x50, 0x1f, 0x28, 0x82, 0xf2, 0x9e, 0x9d, 0x9d, 0xcf, 0x26,
|
||||
0x54, 0x65, 0x0f, 0x96, 0xa4, 0x7b, 0x5f, 0x4f, 0x77, 0x55, 0x09, 0x33, 0x4a, 0xba, 0x00, 0x44,
|
||||
0x78, 0xa3, 0x7c, 0x73, 0xd3, 0x6f, 0x3c, 0xd0, 0xea, 0x5a, 0x91, 0x75, 0xbd, 0x5d, 0x68, 0xfd,
|
||||
0xaa, 0x72, 0x62, 0x17, 0xd6, 0x58, 0xa6, 0x43, 0x2e, 0x73, 0xa3, 0x6b, 0x15, 0x7c, 0xfb, 0x19,
|
||||
0xee, 0xe6, 0xc4, 0x3f, 0x6b, 0xc1, 0x17, 0x03, 0x36, 0xf4, 0x6b, 0x17, 0xa7, 0xd1, 0x28, 0x4c,
|
||||
0xa3, 0x62, 0xc4, 0x41, 0x2c, 0x24, 0xc3, 0x9c, 0x31, 0x72, 0x13, 0x3e, 0x85, 0x06, 0x27, 0x82,
|
||||
0x27, 0x6f, 0x59, 0x18, 0xf8, 0x89, 0xac, 0x4e, 0xa3, 0xbb, 0xa3, 0x2b, 0x71, 0xe7, 0xb0, 0xab,
|
||||
0x73, 0x9d, 0x4f, 0xd0, 0xd0, 0x30, 0xbc, 0x09, 0xeb, 0xe2, 0x9c, 0x93, 0xf8, 0x9c, 0x85, 0xd9,
|
||||
0xa4, 0x57, 0xdd, 0xb9, 0x01, 0x2d, 0x58, 0x8b, 0x3c, 0x21, 0x08, 0xa7, 0x2a, 0x8b, 0xfc, 0x88,
|
||||
0x8f, 0xa0, 0x1e, 0x50, 0x41, 0xf8, 0xd4, 0x0b, 0x55, 0xf8, 0xdd, 0x42, 0x1f, 0x8f, 0xd5, 0x23,
|
||||
0xee, 0xce, 0xa8, 0xdd, 0x6f, 0x65, 0x80, 0x63, 0x2f, 0xe2, 0x47, 0x32, 0x4b, 0x3c, 0x84, 0x7a,
|
||||
0x9f, 0x66, 0x8b, 0x80, 0xf6, 0xea, 0xe5, 0xb0, 0x97, 0xce, 0x88, 0x53, 0xc2, 0x0f, 0xf0, 0xff,
|
||||
0xd2, 0xf9, 0xc6, 0xed, 0x82, 0x43, 0x2f, 0xfd, 0xdd, 0xd8, 0xf7, 0xf4, 0x20, 0x57, 0xae, 0x86,
|
||||
0x53, 0xc2, 0x01, 0x58, 0xab, 0x96, 0x60, 0x65, 0x80, 0x07, 0x0b, 0x01, 0xae, 0x5c, 0x21, 0xa7,
|
||||
0x84, 0xef, 0xa1, 0xd9, 0xa7, 0xfa, 0x4b, 0x8c, 0xad, 0xeb, 0xde, 0x68, 0xfb, 0xce, 0x12, 0xc6,
|
||||
0xe2, 0xbb, 0xea, 0x94, 0xf0, 0x25, 0x6c, 0xf4, 0xa9, 0x14, 0x98, 0x5d, 0xbc, 0xa7, 0xbb, 0x15,
|
||||
0xff, 0xa6, 0xf6, 0x0a, 0x49, 0x4e, 0x69, 0x50, 0x93, 0x96, 0x87, 0xbf, 0x02, 0x00, 0x00, 0xff,
|
||||
0xff, 0x08, 0x99, 0x1b, 0xe5, 0xfd, 0x07, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// DaprClientClient is the client API for DaprClient service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type DaprClientClient interface {
|
||||
OnInvoke(ctx context.Context, in *InvokeEnvelope, opts ...grpc.CallOption) (*any.Any, error)
|
||||
GetTopicSubscriptions(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetTopicSubscriptionsEnvelope, error)
|
||||
GetBindingsSubscriptions(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetBindingsSubscriptionsEnvelope, error)
|
||||
OnBindingEvent(ctx context.Context, in *BindingEventEnvelope, opts ...grpc.CallOption) (*BindingResponseEnvelope, error)
|
||||
OnTopicEvent(ctx context.Context, in *CloudEventEnvelope, opts ...grpc.CallOption) (*empty.Empty, error)
|
||||
}
|
||||
|
||||
type daprClientClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewDaprClientClient(cc *grpc.ClientConn) DaprClientClient {
|
||||
return &daprClientClient{cc}
|
||||
}
|
||||
|
||||
func (c *daprClientClient) OnInvoke(ctx context.Context, in *InvokeEnvelope, opts ...grpc.CallOption) (*any.Any, error) {
|
||||
out := new(any.Any)
|
||||
err := c.cc.Invoke(ctx, "/daprclient.DaprClient/OnInvoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *daprClientClient) GetTopicSubscriptions(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetTopicSubscriptionsEnvelope, error) {
|
||||
out := new(GetTopicSubscriptionsEnvelope)
|
||||
err := c.cc.Invoke(ctx, "/daprclient.DaprClient/GetTopicSubscriptions", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *daprClientClient) GetBindingsSubscriptions(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetBindingsSubscriptionsEnvelope, error) {
|
||||
out := new(GetBindingsSubscriptionsEnvelope)
|
||||
err := c.cc.Invoke(ctx, "/daprclient.DaprClient/GetBindingsSubscriptions", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *daprClientClient) OnBindingEvent(ctx context.Context, in *BindingEventEnvelope, opts ...grpc.CallOption) (*BindingResponseEnvelope, error) {
|
||||
out := new(BindingResponseEnvelope)
|
||||
err := c.cc.Invoke(ctx, "/daprclient.DaprClient/OnBindingEvent", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *daprClientClient) OnTopicEvent(ctx context.Context, in *CloudEventEnvelope, opts ...grpc.CallOption) (*empty.Empty, error) {
|
||||
out := new(empty.Empty)
|
||||
err := c.cc.Invoke(ctx, "/daprclient.DaprClient/OnTopicEvent", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DaprClientServer is the server API for DaprClient service.
|
||||
type DaprClientServer interface {
|
||||
OnInvoke(context.Context, *InvokeEnvelope) (*any.Any, error)
|
||||
GetTopicSubscriptions(context.Context, *empty.Empty) (*GetTopicSubscriptionsEnvelope, error)
|
||||
GetBindingsSubscriptions(context.Context, *empty.Empty) (*GetBindingsSubscriptionsEnvelope, error)
|
||||
OnBindingEvent(context.Context, *BindingEventEnvelope) (*BindingResponseEnvelope, error)
|
||||
OnTopicEvent(context.Context, *CloudEventEnvelope) (*empty.Empty, error)
|
||||
}
|
||||
|
||||
func RegisterDaprClientServer(s *grpc.Server, srv DaprClientServer) {
|
||||
s.RegisterService(&_DaprClient_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _DaprClient_OnInvoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(InvokeEnvelope)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DaprClientServer).OnInvoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/daprclient.DaprClient/OnInvoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DaprClientServer).OnInvoke(ctx, req.(*InvokeEnvelope))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DaprClient_GetTopicSubscriptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(empty.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DaprClientServer).GetTopicSubscriptions(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/daprclient.DaprClient/GetTopicSubscriptions",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DaprClientServer).GetTopicSubscriptions(ctx, req.(*empty.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DaprClient_GetBindingsSubscriptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(empty.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DaprClientServer).GetBindingsSubscriptions(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/daprclient.DaprClient/GetBindingsSubscriptions",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DaprClientServer).GetBindingsSubscriptions(ctx, req.(*empty.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DaprClient_OnBindingEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BindingEventEnvelope)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DaprClientServer).OnBindingEvent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/daprclient.DaprClient/OnBindingEvent",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DaprClientServer).OnBindingEvent(ctx, req.(*BindingEventEnvelope))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DaprClient_OnTopicEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CloudEventEnvelope)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DaprClientServer).OnTopicEvent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/daprclient.DaprClient/OnTopicEvent",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DaprClientServer).OnTopicEvent(ctx, req.(*CloudEventEnvelope))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _DaprClient_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "daprclient.DaprClient",
|
||||
HandlerType: (*DaprClientServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "OnInvoke",
|
||||
Handler: _DaprClient_OnInvoke_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetTopicSubscriptions",
|
||||
Handler: _DaprClient_GetTopicSubscriptions_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetBindingsSubscriptions",
|
||||
Handler: _DaprClient_GetBindingsSubscriptions_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "OnBindingEvent",
|
||||
Handler: _DaprClient_OnBindingEvent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "OnTopicEvent",
|
||||
Handler: _DaprClient_OnTopicEvent_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "daprclient.proto",
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package daprclient;
|
||||
|
||||
import "google/protobuf/any.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
|
||||
option java_outer_classname = "DaprClientProtos";
|
||||
option java_package = "io.dapr";
|
||||
|
||||
// User Code definitions
|
||||
service DaprClient {
|
||||
rpc OnInvoke (InvokeEnvelope) returns (google.protobuf.Any) {}
|
||||
rpc GetTopicSubscriptions(google.protobuf.Empty) returns (GetTopicSubscriptionsEnvelope) {}
|
||||
rpc GetBindingsSubscriptions(google.protobuf.Empty) returns (GetBindingsSubscriptionsEnvelope) {}
|
||||
rpc OnBindingEvent(BindingEventEnvelope) returns (BindingResponseEnvelope) {}
|
||||
rpc OnTopicEvent(CloudEventEnvelope) returns (google.protobuf.Empty) {}
|
||||
}
|
||||
|
||||
message CloudEventEnvelope {
|
||||
string id = 1;
|
||||
string source = 2;
|
||||
string type = 3;
|
||||
string specVersion = 4;
|
||||
string dataContentType = 5;
|
||||
string topic = 6;
|
||||
google.protobuf.Any data = 7;
|
||||
}
|
||||
|
||||
message BindingEventEnvelope {
|
||||
string name = 1;
|
||||
google.protobuf.Any data = 2;
|
||||
map<string,string> metadata = 3;
|
||||
}
|
||||
|
||||
message BindingResponseEnvelope {
|
||||
google.protobuf.Any data = 1;
|
||||
repeated string to = 2;
|
||||
repeated State state = 3;
|
||||
string concurrency = 4;
|
||||
}
|
||||
|
||||
message InvokeEnvelope {
|
||||
string method = 1;
|
||||
google.protobuf.Any data = 2;
|
||||
map<string,string> metadata = 3;
|
||||
}
|
||||
|
||||
message GetTopicSubscriptionsEnvelope {
|
||||
repeated string topics = 1;
|
||||
}
|
||||
|
||||
message GetBindingsSubscriptionsEnvelope {
|
||||
repeated string bindings = 1;
|
||||
}
|
||||
|
||||
message State {
|
||||
string key = 1;
|
||||
google.protobuf.Any value = 2;
|
||||
string etag = 3;
|
||||
map<string,string> metadata = 4;
|
||||
StateOptions options = 5;
|
||||
}
|
||||
|
||||
message StateOptions {
|
||||
string concurrency = 1;
|
||||
string consistency = 2;
|
||||
RetryPolicy retryPolicy = 3;
|
||||
}
|
||||
|
||||
message RetryPolicy {
|
||||
int32 threshold = 1;
|
||||
string pattern = 2;
|
||||
google.protobuf.Duration interval = 3;
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
<project
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-parent</artifactId>
|
||||
<version>0.3.0-alpha</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dapr-sdk</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.3.0-alpha</version>
|
||||
<name>dapr-sdk</name>
|
||||
<description>SDK for Dapr</description>
|
||||
|
||||
<properties>
|
||||
<protobuf.output.directory>generated-proto</protobuf.output.directory>
|
||||
<protobuf.input.directory>${project.parent.basedir}/proto</protobuf.input.directory>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-netty-shaded</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-protobuf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-stub</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-testing</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java-util</artifactId>
|
||||
<version>${protobuf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.os72</groupId>
|
||||
<artifactId>protoc-jar-maven-plugin</artifactId>
|
||||
<version>3.10.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.os72</groupId>
|
||||
<artifactId>protoc-jar-maven-plugin</artifactId>
|
||||
<version>3.10.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<protocVersion>${protobuf.version}</protocVersion>
|
||||
<addProtoSources>inputs</addProtoSources>
|
||||
<includeMavenTypes>direct</includeMavenTypes>
|
||||
<includeStdTypes>true</includeStdTypes>
|
||||
<inputDirectories>
|
||||
<include>${protobuf.input.directory}/dapr</include>
|
||||
<include>${protobuf.input.directory}/daprclient</include>
|
||||
</inputDirectories>
|
||||
<outputTargets>
|
||||
<outputTarget>
|
||||
<type>java</type>
|
||||
<outputDirectory>${project.build.sourceDirectory}</outputDirectory>
|
||||
</outputTarget>
|
||||
<outputTarget>
|
||||
<type>grpc-java</type>
|
||||
<outputDirectory>${project.build.sourceDirectory}</outputDirectory>
|
||||
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}</pluginArtifact>
|
||||
</outputTarget>
|
||||
</outputTargets>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -21,8 +21,8 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
|||
* </pre>
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler (version 1.24.0)",
|
||||
comments = "Source: daprclient/daprclient.proto")
|
||||
value = "by gRPC proto compiler (version 1.25.0)",
|
||||
comments = "Source: daprclient.proto")
|
||||
public final class DaprClientGrpc {
|
||||
|
||||
private DaprClientGrpc() {}
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: daprclient/daprclient.proto
|
||||
// source: daprclient.proto
|
||||
|
||||
package io.dapr;
|
||||
|
||||
|
@ -9542,51 +9542,51 @@ public final class DaprClientProtos {
|
|||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\033daprclient/daprclient.proto\022\ndaprclien" +
|
||||
"t\032\031google/protobuf/any.proto\032\033google/pro" +
|
||||
"tobuf/empty.proto\032\036google/protobuf/durat" +
|
||||
"ion.proto\"\237\001\n\022CloudEventEnvelope\022\n\n\002id\030\001" +
|
||||
" \001(\t\022\016\n\006source\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\022\023\n\013sp" +
|
||||
"ecVersion\030\004 \001(\t\022\027\n\017dataContentType\030\005 \001(\t" +
|
||||
"\022\r\n\005topic\030\006 \001(\t\022\"\n\004data\030\007 \001(\0132\024.google.p" +
|
||||
"rotobuf.Any\"\273\001\n\024BindingEventEnvelope\022\014\n\004" +
|
||||
"name\030\001 \001(\t\022\"\n\004data\030\002 \001(\0132\024.google.protob" +
|
||||
"uf.Any\022@\n\010metadata\030\003 \003(\0132..daprclient.Bi" +
|
||||
"ndingEventEnvelope.MetadataEntry\032/\n\rMeta" +
|
||||
"dataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" +
|
||||
"\001\"\200\001\n\027BindingResponseEnvelope\022\"\n\004data\030\001 " +
|
||||
"\001(\0132\024.google.protobuf.Any\022\n\n\002to\030\002 \003(\t\022 \n" +
|
||||
"\005state\030\003 \003(\0132\021.daprclient.State\022\023\n\013concu" +
|
||||
"rrency\030\004 \001(\t\"\261\001\n\016InvokeEnvelope\022\016\n\006metho" +
|
||||
"d\030\001 \001(\t\022\"\n\004data\030\002 \001(\0132\024.google.protobuf." +
|
||||
"Any\022:\n\010metadata\030\003 \003(\0132(.daprclient.Invok" +
|
||||
"eEnvelope.MetadataEntry\032/\n\rMetadataEntry" +
|
||||
"\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"/\n\035GetT" +
|
||||
"opicSubscriptionsEnvelope\022\016\n\006topics\030\001 \003(" +
|
||||
"\t\"4\n GetBindingsSubscriptionsEnvelope\022\020\n" +
|
||||
"\010bindings\030\001 \003(\t\"\326\001\n\005State\022\013\n\003key\030\001 \001(\t\022#" +
|
||||
"\n\005value\030\002 \001(\0132\024.google.protobuf.Any\022\014\n\004e" +
|
||||
"tag\030\003 \001(\t\0221\n\010metadata\030\004 \003(\0132\037.daprclient" +
|
||||
".State.MetadataEntry\022)\n\007options\030\005 \001(\0132\030." +
|
||||
"daprclient.StateOptions\032/\n\rMetadataEntry" +
|
||||
"\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"f\n\014Stat" +
|
||||
"eOptions\022\023\n\013concurrency\030\001 \001(\t\022\023\n\013consist" +
|
||||
"ency\030\002 \001(\t\022,\n\013retryPolicy\030\003 \001(\0132\027.daprcl" +
|
||||
"ient.RetryPolicy\"^\n\013RetryPolicy\022\021\n\tthres" +
|
||||
"hold\030\001 \001(\005\022\017\n\007pattern\030\002 \001(\t\022+\n\010interval\030" +
|
||||
"\003 \001(\0132\031.google.protobuf.Duration2\263\003\n\nDap" +
|
||||
"rClient\022>\n\010OnInvoke\022\032.daprclient.InvokeE" +
|
||||
"nvelope\032\024.google.protobuf.Any\"\000\022\\\n\025GetTo" +
|
||||
"picSubscriptions\022\026.google.protobuf.Empty" +
|
||||
"\032).daprclient.GetTopicSubscriptionsEnvel" +
|
||||
"ope\"\000\022b\n\030GetBindingsSubscriptions\022\026.goog" +
|
||||
"le.protobuf.Empty\032,.daprclient.GetBindin" +
|
||||
"gsSubscriptionsEnvelope\"\000\022Y\n\016OnBindingEv" +
|
||||
"ent\022 .daprclient.BindingEventEnvelope\032#." +
|
||||
"daprclient.BindingResponseEnvelope\"\000\022H\n\014" +
|
||||
"OnTopicEvent\022\036.daprclient.CloudEventEnve" +
|
||||
"lope\032\026.google.protobuf.Empty\"\000B\033\n\007io.dap" +
|
||||
"rB\020DaprClientProtosb\006proto3"
|
||||
"\n\020daprclient.proto\022\ndaprclient\032\031google/p" +
|
||||
"rotobuf/any.proto\032\033google/protobuf/empty" +
|
||||
".proto\032\036google/protobuf/duration.proto\"\237" +
|
||||
"\001\n\022CloudEventEnvelope\022\n\n\002id\030\001 \001(\t\022\016\n\006sou" +
|
||||
"rce\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\022\023\n\013specVersion\030\004" +
|
||||
" \001(\t\022\027\n\017dataContentType\030\005 \001(\t\022\r\n\005topic\030\006" +
|
||||
" \001(\t\022\"\n\004data\030\007 \001(\0132\024.google.protobuf.Any" +
|
||||
"\"\273\001\n\024BindingEventEnvelope\022\014\n\004name\030\001 \001(\t\022" +
|
||||
"\"\n\004data\030\002 \001(\0132\024.google.protobuf.Any\022@\n\010m" +
|
||||
"etadata\030\003 \003(\0132..daprclient.BindingEventE" +
|
||||
"nvelope.MetadataEntry\032/\n\rMetadataEntry\022\013" +
|
||||
"\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\200\001\n\027Bindi" +
|
||||
"ngResponseEnvelope\022\"\n\004data\030\001 \001(\0132\024.googl" +
|
||||
"e.protobuf.Any\022\n\n\002to\030\002 \003(\t\022 \n\005state\030\003 \003(" +
|
||||
"\0132\021.daprclient.State\022\023\n\013concurrency\030\004 \001(" +
|
||||
"\t\"\261\001\n\016InvokeEnvelope\022\016\n\006method\030\001 \001(\t\022\"\n\004" +
|
||||
"data\030\002 \001(\0132\024.google.protobuf.Any\022:\n\010meta" +
|
||||
"data\030\003 \003(\0132(.daprclient.InvokeEnvelope.M" +
|
||||
"etadataEntry\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001" +
|
||||
"(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"/\n\035GetTopicSubscri" +
|
||||
"ptionsEnvelope\022\016\n\006topics\030\001 \003(\t\"4\n GetBin" +
|
||||
"dingsSubscriptionsEnvelope\022\020\n\010bindings\030\001" +
|
||||
" \003(\t\"\326\001\n\005State\022\013\n\003key\030\001 \001(\t\022#\n\005value\030\002 \001" +
|
||||
"(\0132\024.google.protobuf.Any\022\014\n\004etag\030\003 \001(\t\0221" +
|
||||
"\n\010metadata\030\004 \003(\0132\037.daprclient.State.Meta" +
|
||||
"dataEntry\022)\n\007options\030\005 \001(\0132\030.daprclient." +
|
||||
"StateOptions\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001" +
|
||||
"(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"f\n\014StateOptions\022\023\n" +
|
||||
"\013concurrency\030\001 \001(\t\022\023\n\013consistency\030\002 \001(\t\022" +
|
||||
",\n\013retryPolicy\030\003 \001(\0132\027.daprclient.RetryP" +
|
||||
"olicy\"^\n\013RetryPolicy\022\021\n\tthreshold\030\001 \001(\005\022" +
|
||||
"\017\n\007pattern\030\002 \001(\t\022+\n\010interval\030\003 \001(\0132\031.goo" +
|
||||
"gle.protobuf.Duration2\263\003\n\nDaprClient\022>\n\010" +
|
||||
"OnInvoke\022\032.daprclient.InvokeEnvelope\032\024.g" +
|
||||
"oogle.protobuf.Any\"\000\022\\\n\025GetTopicSubscrip" +
|
||||
"tions\022\026.google.protobuf.Empty\032).daprclie" +
|
||||
"nt.GetTopicSubscriptionsEnvelope\"\000\022b\n\030Ge" +
|
||||
"tBindingsSubscriptions\022\026.google.protobuf" +
|
||||
".Empty\032,.daprclient.GetBindingsSubscript" +
|
||||
"ionsEnvelope\"\000\022Y\n\016OnBindingEvent\022 .daprc" +
|
||||
"lient.BindingEventEnvelope\032#.daprclient." +
|
||||
"BindingResponseEnvelope\"\000\022H\n\014OnTopicEven" +
|
||||
"t\022\036.daprclient.CloudEventEnvelope\032\026.goog" +
|
||||
"le.protobuf.Empty\"\000B\033\n\007io.daprB\020DaprClie" +
|
||||
"ntProtosb\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
|
@ -21,8 +21,8 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
|||
* </pre>
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler (version 1.24.0)",
|
||||
comments = "Source: dapr/dapr.proto")
|
||||
value = "by gRPC proto compiler (version 1.25.0)",
|
||||
comments = "Source: dapr.proto")
|
||||
public final class DaprGrpc {
|
||||
|
||||
private DaprGrpc() {}
|
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: dapr/dapr.proto
|
||||
// source: dapr.proto
|
||||
|
||||
package io.dapr;
|
||||
|
||||
|
@ -13638,65 +13638,65 @@ public final class DaprProtos {
|
|||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\017dapr/dapr.proto\022\004dapr\032\031google/protobuf" +
|
||||
"/any.proto\032\033google/protobuf/empty.proto\032" +
|
||||
"\036google/protobuf/duration.proto\"\271\001\n\035Invo" +
|
||||
"keServiceResponseEnvelope\022\"\n\004data\030\001 \001(\0132" +
|
||||
"\024.google.protobuf.Any\022C\n\010metadata\030\002 \003(\0132" +
|
||||
"1.dapr.InvokeServiceResponseEnvelope.Met" +
|
||||
"adataEntry\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t" +
|
||||
"\022\r\n\005value\030\002 \001(\t:\0028\001\"U\n\023DeleteStateEnvelo" +
|
||||
"pe\022\013\n\003key\030\001 \001(\t\022\014\n\004etag\030\002 \001(\t\022#\n\007options" +
|
||||
"\030\003 \001(\0132\022.dapr.StateOptions\"9\n\021SaveStateE" +
|
||||
"nvelope\022$\n\010requests\030\001 \003(\0132\022.dapr.StateRe" +
|
||||
"quest\"4\n\020GetStateEnvelope\022\013\n\003key\030\001 \001(\t\022\023" +
|
||||
"\n\013consistency\030\002 \001(\t\"L\n\030GetStateResponseE" +
|
||||
"nvelope\022\"\n\004data\030\001 \001(\0132\024.google.protobuf." +
|
||||
"Any\022\014\n\004etag\030\002 \001(\t\"\267\001\n\025InvokeBindingEnvel" +
|
||||
"ope\022\014\n\004name\030\001 \001(\t\022\"\n\004data\030\002 \001(\0132\024.google" +
|
||||
".protobuf.Any\022;\n\010metadata\030\003 \003(\0132).dapr.I" +
|
||||
"nvokeBindingEnvelope.MetadataEntry\032/\n\rMe" +
|
||||
"tadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" +
|
||||
"\0028\001\"\305\001\n\025InvokeServiceEnvelope\022\n\n\002id\030\001 \001(" +
|
||||
"\t\022\016\n\006method\030\002 \001(\t\022\"\n\004data\030\003 \001(\0132\024.google" +
|
||||
".protobuf.Any\022;\n\010metadata\030\004 \003(\0132).dapr.I" +
|
||||
"nvokeServiceEnvelope.MetadataEntry\032/\n\rMe" +
|
||||
"tadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" +
|
||||
"\0028\001\"I\n\024PublishEventEnvelope\022\r\n\005topic\030\001 \001" +
|
||||
"(\t\022\"\n\004data\030\002 \001(\0132\024.google.protobuf.Any\"\312" +
|
||||
"\001\n\005State\022\013\n\003key\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.g" +
|
||||
"oogle.protobuf.Any\022\014\n\004etag\030\003 \001(\t\022+\n\010meta" +
|
||||
"data\030\004 \003(\0132\031.dapr.State.MetadataEntry\022#\n" +
|
||||
"\007options\030\005 \001(\0132\022.dapr.StateOptions\032/\n\rMe" +
|
||||
"tadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" +
|
||||
"\0028\001\"`\n\014StateOptions\022\023\n\013concurrency\030\001 \001(\t" +
|
||||
"\022\023\n\013consistency\030\002 \001(\t\022&\n\013retryPolicy\030\003 \001" +
|
||||
"(\0132\021.dapr.RetryPolicy\"^\n\013RetryPolicy\022\021\n\t" +
|
||||
"threshold\030\001 \001(\005\022\017\n\007pattern\030\002 \001(\t\022+\n\010inte" +
|
||||
"rval\030\003 \001(\0132\031.google.protobuf.Duration\"\337\001" +
|
||||
"\n\014StateRequest\022\013\n\003key\030\001 \001(\t\022#\n\005value\030\002 \001" +
|
||||
"(\0132\024.google.protobuf.Any\022\014\n\004etag\030\003 \001(\t\0222" +
|
||||
"\n\010metadata\030\004 \003(\0132 .dapr.StateRequest.Met" +
|
||||
"adataEntry\022*\n\007options\030\005 \001(\0132\031.dapr.State" +
|
||||
"RequestOptions\032/\n\rMetadataEntry\022\013\n\003key\030\001" +
|
||||
" \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"l\n\023StateRequestO" +
|
||||
"ptions\022\023\n\013concurrency\030\001 \001(\t\022\023\n\013consisten" +
|
||||
"cy\030\002 \001(\t\022+\n\013retryPolicy\030\003 \001(\0132\026.dapr.Sta" +
|
||||
"teRetryPolicy\"c\n\020StateRetryPolicy\022\021\n\tthr" +
|
||||
"eshold\030\001 \001(\005\022\017\n\007pattern\030\002 \001(\t\022+\n\010interva" +
|
||||
"l\030\003 \001(\0132\031.google.protobuf.Duration2\263\003\n\004D" +
|
||||
"apr\022D\n\014PublishEvent\022\032.dapr.PublishEventE" +
|
||||
"nvelope\032\026.google.protobuf.Empty\"\000\022S\n\rInv" +
|
||||
"okeService\022\033.dapr.InvokeServiceEnvelope\032" +
|
||||
"#.dapr.InvokeServiceResponseEnvelope\"\000\022F" +
|
||||
"\n\rInvokeBinding\022\033.dapr.InvokeBindingEnve" +
|
||||
"lope\032\026.google.protobuf.Empty\"\000\022D\n\010GetSta" +
|
||||
"te\022\026.dapr.GetStateEnvelope\032\036.dapr.GetSta" +
|
||||
"teResponseEnvelope\"\000\022>\n\tSaveState\022\027.dapr" +
|
||||
".SaveStateEnvelope\032\026.google.protobuf.Emp" +
|
||||
"ty\"\000\022B\n\013DeleteState\022\031.dapr.DeleteStateEn" +
|
||||
"velope\032\026.google.protobuf.Empty\"\000B\025\n\007io.d" +
|
||||
"aprB\nDaprProtosb\006proto3"
|
||||
"\n\ndapr.proto\022\004dapr\032\031google/protobuf/any." +
|
||||
"proto\032\033google/protobuf/empty.proto\032\036goog" +
|
||||
"le/protobuf/duration.proto\"\271\001\n\035InvokeSer" +
|
||||
"viceResponseEnvelope\022\"\n\004data\030\001 \001(\0132\024.goo" +
|
||||
"gle.protobuf.Any\022C\n\010metadata\030\002 \003(\01321.dap" +
|
||||
"r.InvokeServiceResponseEnvelope.Metadata" +
|
||||
"Entry\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" +
|
||||
"alue\030\002 \001(\t:\0028\001\"U\n\023DeleteStateEnvelope\022\013\n" +
|
||||
"\003key\030\001 \001(\t\022\014\n\004etag\030\002 \001(\t\022#\n\007options\030\003 \001(" +
|
||||
"\0132\022.dapr.StateOptions\"9\n\021SaveStateEnvelo" +
|
||||
"pe\022$\n\010requests\030\001 \003(\0132\022.dapr.StateRequest" +
|
||||
"\"4\n\020GetStateEnvelope\022\013\n\003key\030\001 \001(\t\022\023\n\013con" +
|
||||
"sistency\030\002 \001(\t\"L\n\030GetStateResponseEnvelo" +
|
||||
"pe\022\"\n\004data\030\001 \001(\0132\024.google.protobuf.Any\022\014" +
|
||||
"\n\004etag\030\002 \001(\t\"\267\001\n\025InvokeBindingEnvelope\022\014" +
|
||||
"\n\004name\030\001 \001(\t\022\"\n\004data\030\002 \001(\0132\024.google.prot" +
|
||||
"obuf.Any\022;\n\010metadata\030\003 \003(\0132).dapr.Invoke" +
|
||||
"BindingEnvelope.MetadataEntry\032/\n\rMetadat" +
|
||||
"aEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\305" +
|
||||
"\001\n\025InvokeServiceEnvelope\022\n\n\002id\030\001 \001(\t\022\016\n\006" +
|
||||
"method\030\002 \001(\t\022\"\n\004data\030\003 \001(\0132\024.google.prot" +
|
||||
"obuf.Any\022;\n\010metadata\030\004 \003(\0132).dapr.Invoke" +
|
||||
"ServiceEnvelope.MetadataEntry\032/\n\rMetadat" +
|
||||
"aEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"I" +
|
||||
"\n\024PublishEventEnvelope\022\r\n\005topic\030\001 \001(\t\022\"\n" +
|
||||
"\004data\030\002 \001(\0132\024.google.protobuf.Any\"\312\001\n\005St" +
|
||||
"ate\022\013\n\003key\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.google" +
|
||||
".protobuf.Any\022\014\n\004etag\030\003 \001(\t\022+\n\010metadata\030" +
|
||||
"\004 \003(\0132\031.dapr.State.MetadataEntry\022#\n\007opti" +
|
||||
"ons\030\005 \001(\0132\022.dapr.StateOptions\032/\n\rMetadat" +
|
||||
"aEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"`" +
|
||||
"\n\014StateOptions\022\023\n\013concurrency\030\001 \001(\t\022\023\n\013c" +
|
||||
"onsistency\030\002 \001(\t\022&\n\013retryPolicy\030\003 \001(\0132\021." +
|
||||
"dapr.RetryPolicy\"^\n\013RetryPolicy\022\021\n\tthres" +
|
||||
"hold\030\001 \001(\005\022\017\n\007pattern\030\002 \001(\t\022+\n\010interval\030" +
|
||||
"\003 \001(\0132\031.google.protobuf.Duration\"\337\001\n\014Sta" +
|
||||
"teRequest\022\013\n\003key\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024." +
|
||||
"google.protobuf.Any\022\014\n\004etag\030\003 \001(\t\0222\n\010met" +
|
||||
"adata\030\004 \003(\0132 .dapr.StateRequest.Metadata" +
|
||||
"Entry\022*\n\007options\030\005 \001(\0132\031.dapr.StateReque" +
|
||||
"stOptions\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022" +
|
||||
"\r\n\005value\030\002 \001(\t:\0028\001\"l\n\023StateRequestOption" +
|
||||
"s\022\023\n\013concurrency\030\001 \001(\t\022\023\n\013consistency\030\002 " +
|
||||
"\001(\t\022+\n\013retryPolicy\030\003 \001(\0132\026.dapr.StateRet" +
|
||||
"ryPolicy\"c\n\020StateRetryPolicy\022\021\n\tthreshol" +
|
||||
"d\030\001 \001(\005\022\017\n\007pattern\030\002 \001(\t\022+\n\010interval\030\003 \001" +
|
||||
"(\0132\031.google.protobuf.Duration2\263\003\n\004Dapr\022D" +
|
||||
"\n\014PublishEvent\022\032.dapr.PublishEventEnvelo" +
|
||||
"pe\032\026.google.protobuf.Empty\"\000\022S\n\rInvokeSe" +
|
||||
"rvice\022\033.dapr.InvokeServiceEnvelope\032#.dap" +
|
||||
"r.InvokeServiceResponseEnvelope\"\000\022F\n\rInv" +
|
||||
"okeBinding\022\033.dapr.InvokeBindingEnvelope\032" +
|
||||
"\026.google.protobuf.Empty\"\000\022D\n\010GetState\022\026." +
|
||||
"dapr.GetStateEnvelope\032\036.dapr.GetStateRes" +
|
||||
"ponseEnvelope\"\000\022>\n\tSaveState\022\027.dapr.Save" +
|
||||
"StateEnvelope\032\026.google.protobuf.Empty\"\000\022" +
|
||||
"B\n\013DeleteState\022\031.dapr.DeleteStateEnvelop" +
|
||||
"e\032\026.google.protobuf.Empty\"\000B(\n\007io.daprB\n" +
|
||||
"DaprProtos\252\002\020Dapr.Client.Grpcb\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
Loading…
Reference in New Issue