Skip to content
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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ vpath %.proto $(PROTOS_PATH)

all: system-check libdapr.so

libdapr.so : ./src/dapr/proto/common/v1/common.pb.o ./src/dapr/proto/dapr/v1/dapr.pb.o ./src/dapr/proto/dapr/v1/dapr.grpc.pb.o ./src/dapr/proto/daprclient/v1/daprclient.pb.o ./src/dapr/proto/daprclient/v1/daprclient.grpc.pb.o
libdapr.so : ./src/dapr/proto/common/v1/common.pb.o ./src/dapr/proto/runtime/v1/dapr.pb.o ./src/dapr/proto/runtime/v1/dapr.grpc.pb.o ./src/dapr/proto/runtime/v1/appcallback.pb.o ./src/dapr/proto/runtime/v1/appcallback.grpc.pb.o
-mkdir ./out
$(CXX) -shared -Wl,-soname,libdapr.so.0 -o ./out/libdapr.0.2.0.so ./src/dapr/proto/dapr/v1/*.o ./src/dapr/proto/daprclient/v1/*.o ./src/dapr/proto/common/v1/*.o
$(CXX) -shared -Wl,-soname,libdapr.so.0 -o ./out/libdapr.0.2.0.so ./src/dapr/proto/runtime/v1/*.o ./src/dapr/proto/common/v1/*.o

%.o : %.cc
$(CXX) -c -fPIC -I./src $< -o $@
Expand All @@ -30,7 +30,7 @@ libdapr.so : ./src/dapr/proto/common/v1/common.pb.o ./src/dapr/proto/dapr/v1/dap
$(PROTOC) -I $(PROTOS_PATH) --cpp_out=./src/ $<

clean:
rm -f ./src/dapr/*.o ./src/daprclient/*.o
rm -f ./src/dapr/proto/common/v1/*.o ./src/dapr/proto/runtime/v1/*.o
rm -rf ./out

# The following is to test your system and ensure a smoother experience.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Alpha quality.
3. Generate client
```bash
make ./dapr/proto/common/v1/common.pb.cc
make ./dapr/proto/dapr/v1/dapr.grpc.pb.cc
make ./dapr/proto/dapr/v1/dapr.pb.cc
make ./dapr/proto/daprclient/v1/daprclient.grpc.pb.cc
make ./dapr/proto/daprclient/v1/daprclient.pb.cc
make ./dapr/proto/runtime/v1/dapr.grpc.pb.cc
make ./dapr/proto/runtime/v1/dapr.pb.cc
make ./dapr/proto/runtime/v1/appcallback.grpc.pb.cc
make ./dapr/proto/runtime/v1/appcallback.pb.cc
```

### Build library
Expand Down
97 changes: 77 additions & 20 deletions dapr/proto/common/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ syntax = "proto3";
package dapr.proto.common.v1;

import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";

option csharp_namespace = "Dapr.Client.Autogen.Grpc.v1";
option java_outer_classname = "CommonProtos";
option java_package = "io.dapr.v1";
option go_package = "github.com/dapr/dapr/pkg/proto/common/v1";
option go_package = "github.com/dapr/dapr/pkg/proto/common/v1;common";

// HTTPExtension includes HTTP verb and querystring
// when Dapr runtime delivers HTTP content.
Expand All @@ -36,48 +37,104 @@ message HTTPExtension {
TRACE = 8;
}

// verb is HTTP verb.
//
// This is required.
// Required. HTTP verb.
Verb verb = 1;

// querystring includes HTTP querystring.
map<string, string> querystring = 2;
}

// InvokeRequest is the message to invoke a method with the data.
// This message is used in InvokeService of Dapr gRPC Service and OnInvoke
// of AppCallback gRPC service.
message InvokeRequest {
// method is a method name which will be invoked by caller.
//
// This field is required.
// Required. method is a method name which will be invoked by caller.
string method = 1;

// data conveys bytes value or Protobuf message which caller sent.
// Required. Bytes value or Protobuf message which caller sent.
// Dapr treats Any.value as bytes type if Any.type_url is unset.
//
// This field is required.
google.protobuf.Any data = 2;

// content_type is the type of data content.
// The type of data content.
//
// This field is required if data delivers http request body
// Otherwise, this is optional.
string content_type = 3;

// http_extension includes http specific fields if request conveys
// http-compatible request.
// HTTP specific fields if request conveys http-compatible request.
//
// This field is optional.
// This field is required for http-compatible request. Otherwise,
// this field is optional.
HTTPExtension http_extension = 4;
}

// InvokeResponse is the response message inclduing data and its content type
// from app callback.
// This message is used in InvokeService of Dapr gRPC Service and OnInvoke
// of AppCallback gRPC service.
message InvokeResponse {
// data conveys the content body of InvokeService response.
//
// This field is required.
// Required. The content body of InvokeService response.
google.protobuf.Any data = 1;

// content_type is the type of data content.
//
// This field is required.
// Required. The type of data content.
string content_type = 2;
}

// StateSaveRequest represents state and options to save the state value.
message StateSaveRequest {
// Required. The state key
string key = 1;

// Required. The state data for key
bytes value = 2;

// The entity tag which represents the specific version of data.
// The exact ETag format is defined by the corresponding data store.
string etag = 3;

// The metadata which will be passed to state store component.
map<string,string> metadata = 4;

// Options for concurrency, consistency, and retry_policy to save the state.
StateOptions options = 5;
}

// StateOptions configures concurrency, consistency, and retry policy for state operations
message StateOptions {
// Enum describing the supported concurrency for state.
enum StateConcurrency {
CONCURRENCY_UNSPECIFIED = 0;
CONCURRENCY_FIRST_WRITE = 1;
CONCURRENCY_LAST_WRITE = 2;
}

// Enum describing the supported consistency for state.
enum StateConsistency {
CONSISTENCY_UNSPECIFIED = 0;
CONSISTENCY_EVENTUAL = 1;
CONSISTENCY_STRONG = 2;
}

StateConcurrency concurrency = 1;
StateConsistency consistency = 2;
StateRetryPolicy retry_policy = 3;
}

// StateRetryPolicy represents retry policy to set and delete state operations.
message StateRetryPolicy {
// Enum describing the support retry pattern
enum RetryPattern {
RETRY_UNSPECIFIED = 0;
RETRY_LINEAR = 1;
RETRY_EXPONENTIAL = 2;
}

// Maximum number of retries.
int32 threshold = 1;

// Retry pattern.
RetryPattern pattern = 2;

// Initial delay between retries.
google.protobuf.Duration interval = 3;
}
114 changes: 0 additions & 114 deletions dapr/proto/dapr/v1/dapr.proto

This file was deleted.

81 changes: 0 additions & 81 deletions dapr/proto/daprclient/v1/daprclient.proto

This file was deleted.

Loading