dapr-ruby 0.4.2 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +10 -2
- data/Gemfile.lock +3 -3
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/dapr.gemspec +22 -24
- data/example.rb +7 -7
- data/examples/app-callback/app_callback_example.rb +3 -1
- data/examples/app-callback/app_callback_service.rb +16 -16
- data/examples/invoke-simple/invoke-caller.rb +10 -10
- data/examples/invoke-simple/invoke-receiver.rb +9 -9
- data/examples/pubsub-simple/publisher.rb +6 -6
- data/examples/pubsub-simple/subscriber.rb +6 -6
- data/examples/state-store/state-store.rb +15 -15
- data/lib/dapr/proto/common/v1/common_pb.rb +33 -31
- data/lib/dapr/proto/runtime/v1/appcallback_pb.rb +52 -50
- data/lib/dapr/proto/runtime/v1/appcallback_services_pb.rb +12 -7
- data/lib/dapr/proto/runtime/v1/dapr_pb.rb +259 -257
- data/lib/dapr/proto/runtime/v1/dapr_services_pb.rb +66 -33
- data/lib/dapr/version.rb +3 -1
- data/lib/dapr-client.rb +1 -1
- data/lib/dapr.rb +3 -1
- metadata +2 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '01098df34c04109617a1800f150de03625e2d8aa89a8adebdda2990532a4d01b'
|
4
|
+
data.tar.gz: c935b97aef96168e7bd2cf87c592574ba45fdb867b6798fd8d1f8e69614f1969
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8821931ded640a679bb308b39acfdda8ff61329cb3c4f14d92b006838a9862ac0246f896d22ee357281320bb29984787365cab0d2720d6cbcef0f5abdaf3c77
|
7
|
+
data.tar.gz: 930eaa2d87677f20867e83c88666e73728105da1d61ce30ce829b63223b286fa59bee6b30c0caa4fe9f275ca3c0c633e18f96104dd8147e5ec5245ed9ea28640
|
data/Gemfile
CHANGED
@@ -1,6 +1,14 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
6
|
|
5
7
|
# Specify your gem's dependencies in dapr.gemspec
|
6
8
|
gemspec
|
9
|
+
|
10
|
+
group :development do
|
11
|
+
gem 'grpc-tools'
|
12
|
+
gem 'rake'
|
13
|
+
gem 'rspec'
|
14
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dapr-
|
4
|
+
dapr-ruby (0.4.3)
|
5
5
|
google-protobuf
|
6
|
+
grpc
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
@@ -59,8 +60,7 @@ PLATFORMS
|
|
59
60
|
x86_64-linux
|
60
61
|
|
61
62
|
DEPENDENCIES
|
62
|
-
dapr-
|
63
|
-
grpc
|
63
|
+
dapr-ruby!
|
64
64
|
grpc-tools
|
65
65
|
rake
|
66
66
|
rspec
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'dapr'
|
5
6
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +11,5 @@ require "dapr"
|
|
10
11
|
# require "pry"
|
11
12
|
# Pry.start
|
12
13
|
|
13
|
-
require
|
14
|
+
require 'irb'
|
14
15
|
IRB.start(__FILE__)
|
data/dapr.gemspec
CHANGED
@@ -1,46 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
5
|
+
require 'dapr/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = 'dapr-ruby'
|
8
9
|
spec.version = Dapr::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
10
|
+
spec.authors = %w[tjwp bougyman]
|
11
|
+
spec.email = ['tjwp@users.noreply.github.com', 'bougyman@users.noreply.github.com']
|
11
12
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
14
|
-
spec.homepage =
|
15
|
-
spec.license =
|
13
|
+
spec.summary = 'Dapr SDK for Ruby'
|
14
|
+
spec.description = 'Dapr SDK for Ruby'
|
15
|
+
spec.homepage = 'https://github.com/rubyists/dapr-ruby-sdk'
|
16
|
+
spec.license = 'MIT'
|
16
17
|
|
17
18
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
19
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
20
|
if spec.respond_to?(:metadata)
|
20
|
-
spec.metadata[
|
21
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
21
22
|
|
22
|
-
spec.metadata[
|
23
|
-
spec.metadata[
|
24
|
-
spec.metadata[
|
25
|
-
spec.metadata[
|
23
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
24
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
25
|
+
spec.metadata['changelog_uri'] = "#{spec.homepage}/CHANGELOG.md"
|
26
|
+
spec.metadata['github_repo'] = 'ssh://github.com/rubyists/dapr-ruby-sdk'
|
26
27
|
else
|
27
|
-
raise
|
28
|
-
|
28
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
29
|
+
'public gem pushes.'
|
29
30
|
end
|
30
31
|
|
31
32
|
# Specify which files should be added to the gem when it is released.
|
32
33
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
33
|
-
spec.files
|
34
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
34
35
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
35
36
|
end
|
36
|
-
spec.bindir =
|
37
|
+
spec.bindir = 'exe'
|
37
38
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
38
|
-
spec.require_paths = [
|
39
|
+
spec.require_paths = ['lib']
|
39
40
|
|
40
|
-
spec.
|
41
|
+
spec.add_dependency 'google-protobuf'
|
41
42
|
|
42
|
-
spec.
|
43
|
-
spec.add_development_dependency "grpc-tools"
|
44
|
-
spec.add_development_dependency "rake"
|
45
|
-
spec.add_development_dependency "rspec"
|
43
|
+
spec.add_dependency 'grpc'
|
46
44
|
end
|
data/example.rb
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'dapr/proto/runtime/v1/dapr_services_pb'
|
4
4
|
|
5
5
|
port = ENV.fetch('DAPR_GRPC_PORT', '5001')
|
6
6
|
dapr_uri = "localhost:#{port}"
|
7
7
|
|
8
8
|
client = Dapr::Proto::Runtime::V1::Dapr::Stub.new(dapr_uri, :this_channel_is_insecure)
|
9
|
-
|
10
|
-
|
9
|
+
client.publish_event(Dapr::Proto::Runtime::V1::PublishEventRequest.new(pubsub_name: 'pubsub', topic: 'sith',
|
10
|
+
data: 'lala'))
|
11
11
|
puts('Published')
|
12
12
|
|
13
13
|
key = 'mykey'
|
14
14
|
store_name = 'statestore'
|
15
|
-
state = Dapr::Proto::Common::V1::StateItem.new(key
|
16
|
-
req = Dapr::Proto::Runtime::V1::SaveStateRequest.new(store_name
|
15
|
+
state = Dapr::Proto::Common::V1::StateItem.new(key:, value: 'my state')
|
16
|
+
req = Dapr::Proto::Runtime::V1::SaveStateRequest.new(store_name:, states: [state])
|
17
17
|
client.save_state(req)
|
18
18
|
puts('Saved!')
|
19
19
|
|
20
|
-
resp = client.get_state(Dapr::Proto::Runtime::V1::GetStateRequest.new(store_name
|
20
|
+
resp = client.get_state(Dapr::Proto::Runtime::V1::GetStateRequest.new(store_name:, key:))
|
21
21
|
puts('Got state!')
|
22
22
|
puts(resp)
|
23
23
|
|
24
|
-
client.delete_state(Dapr::Proto::Runtime::V1::DeleteStateRequest.new(store_name
|
24
|
+
client.delete_state(Dapr::Proto::Runtime::V1::DeleteStateRequest.new(store_name:, key:))
|
25
25
|
puts('Deleted!')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'dapr/proto/runtime/v1/appcallback_services_pb'
|
4
|
+
require 'json'
|
5
5
|
|
6
6
|
class AppCallbackService < Dapr::Proto::Runtime::V1::AppCallback::Service
|
7
7
|
Any = Google::Protobuf::Any
|
@@ -13,27 +13,27 @@ class AppCallbackService < Dapr::Proto::Runtime::V1::AppCallback::Service
|
|
13
13
|
raw_data = invoke.data
|
14
14
|
puts "invoked method '#{method}' with data '#{raw_data}'!"
|
15
15
|
data = JSON.parse(raw_data.value) if raw_data&.value
|
16
|
-
result = { method
|
16
|
+
result = { method:, data: }
|
17
17
|
Dapr::Proto::Common::V1::InvokeResponse.new(data: Any.new(value: result.to_json))
|
18
|
-
rescue =>
|
19
|
-
Dapr::Proto::Common::V1::InvokeResponse.new(data: Any.new(value: { error:
|
18
|
+
rescue StandardError => e
|
19
|
+
Dapr::Proto::Common::V1::InvokeResponse.new(data: Any.new(value: { error: e.inspect }.to_json))
|
20
20
|
end
|
21
21
|
|
22
22
|
def list_topic_subscriptions(_empty, _call)
|
23
|
-
puts
|
24
|
-
pubsub_name =
|
25
|
-
Protocol::ListTopicSubscriptionsResponse
|
26
|
-
|
23
|
+
puts 'topics requested!'
|
24
|
+
pubsub_name = 'pubsub'
|
25
|
+
Protocol::ListTopicSubscriptionsResponse
|
26
|
+
.new(subscriptions: Array(Protocol::TopicSubscription.new(pubsub_name:, topic: 'example')))
|
27
27
|
end
|
28
28
|
|
29
29
|
def list_input_bindings(_empty, _call)
|
30
|
-
puts
|
31
|
-
bindings = %w
|
32
|
-
Protocol::ListInputBindingsResponse.new(bindings:
|
30
|
+
puts 'bindings requested!'
|
31
|
+
bindings = %w[binding]
|
32
|
+
Protocol::ListInputBindingsResponse.new(bindings:)
|
33
33
|
end
|
34
34
|
|
35
35
|
def on_binding_event(binding_event, _call)
|
36
|
-
puts
|
36
|
+
puts 'binding event!'
|
37
37
|
name = binding_event.name
|
38
38
|
raw_data = binding_event.data
|
39
39
|
_metadata = binding_event.metadata
|
@@ -42,12 +42,12 @@ class AppCallbackService < Dapr::Proto::Runtime::V1::AppCallback::Service
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def on_topic_event(topic_event, _call)
|
45
|
-
puts
|
45
|
+
puts 'topic event!'
|
46
46
|
topic = topic_event.topic
|
47
47
|
raw_data = topic_event.data
|
48
48
|
puts "Topic Event: topic:#{topic}, data: #{raw_data}"
|
49
49
|
Google::Protobuf::Empty.new
|
50
|
-
rescue =>
|
51
|
-
puts
|
50
|
+
rescue StandardError => e
|
51
|
+
puts e.inspect
|
52
52
|
end
|
53
53
|
end
|
@@ -1,19 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'dapr/proto/runtime/v1/dapr_services_pb'
|
4
4
|
|
5
5
|
$stdout.sync = true
|
6
6
|
|
7
|
-
port = ENV[
|
7
|
+
port = ENV['DAPR_GRPC_PORT']
|
8
8
|
stub = Dapr::Proto::Runtime::V1::Dapr::Stub.new("localhost:#{port}", :this_channel_is_insecure)
|
9
|
-
request = Dapr::Proto::Runtime::V1::InvokeServiceRequest
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
request = Dapr::Proto::Runtime::V1::InvokeServiceRequest
|
10
|
+
.new(id: 'invoke-receiver',
|
11
|
+
message: Dapr::Proto::Common::V1::InvokeRequest.new(
|
12
|
+
method: 'my-method',
|
13
|
+
data: Google::Protobuf::Any.new(value: 'TEST MESSAGE'),
|
14
|
+
content_type: 'text/plain; charset=UTF-8'
|
15
|
+
))
|
16
16
|
response = stub.invoke_service(request)
|
17
17
|
|
18
18
|
puts response.content_type
|
19
|
-
puts response.data.value
|
19
|
+
puts response.data.value
|
@@ -2,26 +2,26 @@
|
|
2
2
|
|
3
3
|
$stdout.sync = true
|
4
4
|
|
5
|
-
require
|
5
|
+
require 'dapr/proto/runtime/v1/appcallback_services_pb'
|
6
6
|
|
7
7
|
class InvokeReceiverService < Dapr::Proto::Runtime::V1::AppCallback::Service
|
8
8
|
Any = Google::Protobuf::Any
|
9
9
|
|
10
10
|
def on_invoke(invoke, _call)
|
11
|
-
content_type =
|
12
|
-
puts "Invoked method '#{invoke[
|
13
|
-
data = if invoke[
|
14
|
-
Any.new(value:
|
11
|
+
content_type = 'text/plain; charset=UTF-8'
|
12
|
+
puts "Invoked method '#{invoke['method']}' with value '#{invoke['data']['value']}'"
|
13
|
+
data = if invoke['method'] == 'my-method'
|
14
|
+
Any.new(value: 'INVOKE_RECEIVED')
|
15
15
|
else
|
16
|
-
Any.new(value:
|
16
|
+
Any.new(value: 'unsupported method')
|
17
17
|
end
|
18
18
|
|
19
|
-
Dapr::Proto::Common::V1::InvokeResponse.new(data
|
19
|
+
Dapr::Proto::Common::V1::InvokeResponse.new(data:, content_type:)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
server = GRPC::RpcServer.new
|
24
|
-
server.add_http2_port(
|
24
|
+
server.add_http2_port('0.0.0.0:50051', :this_port_is_insecure)
|
25
25
|
server.handle(InvokeReceiverService)
|
26
26
|
|
27
|
-
server.run_till_terminated_or_interrupted([1, +
|
27
|
+
server.run_till_terminated_or_interrupted([1, +'int', +'SIGQUIT'])
|
@@ -1,19 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'dapr/proto/runtime/v1/dapr_services_pb'
|
4
4
|
|
5
5
|
$stdout.sync = true
|
6
6
|
|
7
7
|
RuntimeV1 = Dapr::Proto::Runtime::V1
|
8
8
|
|
9
|
-
port = ENV[
|
9
|
+
port = ENV['DAPR_GRPC_PORT']
|
10
10
|
client = Dapr::Proto::Runtime::V1::Dapr::Stub.new("localhost:#{port}", :this_channel_is_insecure)
|
11
11
|
|
12
12
|
# This matches the name of the pubsub component used
|
13
|
-
pubsub_name =
|
13
|
+
pubsub_name = 'pubsub'
|
14
14
|
|
15
|
-
data =
|
16
|
-
client.publish_event(RuntimeV1::PublishEventRequest
|
17
|
-
new(pubsub_name
|
15
|
+
data = 'ACTION=1'
|
16
|
+
client.publish_event(RuntimeV1::PublishEventRequest
|
17
|
+
.new(pubsub_name:, topic: 'TOPIC_A', data:))
|
18
18
|
|
19
19
|
puts "Published #{data}"
|
@@ -1,22 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'dapr/proto/runtime/v1/appcallback_services_pb'
|
4
4
|
|
5
5
|
$stdout.sync = true
|
6
6
|
|
7
7
|
class Subscriber < Dapr::Proto::Runtime::V1::AppCallback::Service
|
8
8
|
RuntimeV1 = Dapr::Proto::Runtime::V1
|
9
9
|
|
10
|
-
|
11
10
|
# Dapr will call this method to get the list of topics the app
|
12
11
|
# wants to subscribe to. In this example, we are telling Dapr
|
13
12
|
# To subscribe to a topic named TOPIC_A
|
14
13
|
def list_topic_subscriptions(_empty, _call)
|
15
14
|
# Name of the configured pubsub component
|
16
|
-
pubsub_name =
|
15
|
+
pubsub_name = 'pubsub'
|
17
16
|
|
18
17
|
RuntimeV1::ListTopicSubscriptionsResponse.new(
|
19
|
-
|
18
|
+
subscriptions: Array(RuntimeV1::TopicSubscription.new(pubsub_name:, topic: 'TOPIC_A'))
|
19
|
+
)
|
20
20
|
end
|
21
21
|
|
22
22
|
def on_topic_event(topic_event, _call)
|
@@ -26,7 +26,7 @@ class Subscriber < Dapr::Proto::Runtime::V1::AppCallback::Service
|
|
26
26
|
end
|
27
27
|
|
28
28
|
server = GRPC::RpcServer.new
|
29
|
-
server.add_http2_port(
|
29
|
+
server.add_http2_port('0.0.0.0:50051', :this_port_is_insecure)
|
30
30
|
server.handle(Subscriber)
|
31
31
|
|
32
|
-
server.run_till_terminated_or_interrupted([1, +
|
32
|
+
server.run_till_terminated_or_interrupted([1, +'int', +'SIGQUIT'])
|
@@ -1,29 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'dapr/proto/runtime/v1/dapr_services_pb'
|
4
4
|
|
5
5
|
$stdout.sync = true
|
6
6
|
|
7
7
|
RuntimeV1 = Dapr::Proto::Runtime::V1
|
8
8
|
|
9
|
-
port = ENV[
|
9
|
+
port = ENV['DAPR_GRPC_PORT']
|
10
10
|
client = Dapr::Proto::Runtime::V1::Dapr::Stub.new("localhost:#{port}", :this_channel_is_insecure)
|
11
11
|
|
12
|
-
key =
|
13
|
-
store_name =
|
12
|
+
key = 'my-key'
|
13
|
+
store_name = 'statestore'
|
14
14
|
|
15
|
-
state = Dapr::Proto::Common::V1::StateItem
|
16
|
-
|
15
|
+
state = Dapr::Proto::Common::V1::StateItem
|
16
|
+
.new(key:, value: 'my state')
|
17
17
|
|
18
|
-
client.save_state(RuntimeV1::SaveStateRequest
|
19
|
-
new(store_name
|
20
|
-
puts
|
18
|
+
client.save_state(RuntimeV1::SaveStateRequest
|
19
|
+
.new(store_name:, states: Array(state)))
|
20
|
+
puts 'Saved!'
|
21
21
|
|
22
|
-
response = client.get_state(RuntimeV1::GetStateRequest
|
23
|
-
new(store_name
|
24
|
-
puts
|
22
|
+
response = client.get_state(RuntimeV1::GetStateRequest
|
23
|
+
.new(store_name:, key:))
|
24
|
+
puts 'Fetched!'
|
25
25
|
puts response.inspect
|
26
26
|
|
27
|
-
client.delete_state(RuntimeV1::DeleteStateRequest
|
28
|
-
new(store_name
|
29
|
-
puts
|
27
|
+
client.delete_state(RuntimeV1::DeleteStateRequest
|
28
|
+
.new(store_name:, key:))
|
29
|
+
puts 'Deleted!'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
4
|
# source: dapr/proto/common/v1/common.proto
|
3
5
|
|
@@ -6,12 +8,12 @@ require 'google/protobuf'
|
|
6
8
|
require 'google/protobuf/any_pb'
|
7
9
|
|
8
10
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
-
add_file(
|
10
|
-
add_message
|
11
|
-
optional :verb, :enum, 1,
|
11
|
+
add_file('dapr/proto/common/v1/common.proto', syntax: :proto3) do
|
12
|
+
add_message 'dapr.proto.common.v1.HTTPExtension' do
|
13
|
+
optional :verb, :enum, 1, 'dapr.proto.common.v1.HTTPExtension.Verb'
|
12
14
|
optional :querystring, :string, 2
|
13
15
|
end
|
14
|
-
add_enum
|
16
|
+
add_enum 'dapr.proto.common.v1.HTTPExtension.Verb' do
|
15
17
|
value :NONE, 0
|
16
18
|
value :GET, 1
|
17
19
|
value :HEAD, 2
|
@@ -23,45 +25,45 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
23
25
|
value :TRACE, 8
|
24
26
|
value :PATCH, 9
|
25
27
|
end
|
26
|
-
add_message
|
28
|
+
add_message 'dapr.proto.common.v1.InvokeRequest' do
|
27
29
|
optional :method, :string, 1
|
28
|
-
optional :data, :message, 2,
|
30
|
+
optional :data, :message, 2, 'google.protobuf.Any'
|
29
31
|
optional :content_type, :string, 3
|
30
|
-
optional :http_extension, :message, 4,
|
32
|
+
optional :http_extension, :message, 4, 'dapr.proto.common.v1.HTTPExtension'
|
31
33
|
end
|
32
|
-
add_message
|
33
|
-
optional :data, :message, 1,
|
34
|
+
add_message 'dapr.proto.common.v1.InvokeResponse' do
|
35
|
+
optional :data, :message, 1, 'google.protobuf.Any'
|
34
36
|
optional :content_type, :string, 2
|
35
37
|
end
|
36
|
-
add_message
|
38
|
+
add_message 'dapr.proto.common.v1.StreamPayload' do
|
37
39
|
optional :data, :bytes, 1
|
38
40
|
optional :seq, :uint64, 2
|
39
41
|
end
|
40
|
-
add_message
|
42
|
+
add_message 'dapr.proto.common.v1.StateItem' do
|
41
43
|
optional :key, :string, 1
|
42
44
|
optional :value, :bytes, 2
|
43
|
-
optional :etag, :message, 3,
|
45
|
+
optional :etag, :message, 3, 'dapr.proto.common.v1.Etag'
|
44
46
|
map :metadata, :string, :string, 4
|
45
|
-
optional :options, :message, 5,
|
47
|
+
optional :options, :message, 5, 'dapr.proto.common.v1.StateOptions'
|
46
48
|
end
|
47
|
-
add_message
|
49
|
+
add_message 'dapr.proto.common.v1.Etag' do
|
48
50
|
optional :value, :string, 1
|
49
51
|
end
|
50
|
-
add_message
|
51
|
-
optional :concurrency, :enum, 1,
|
52
|
-
optional :consistency, :enum, 2,
|
52
|
+
add_message 'dapr.proto.common.v1.StateOptions' do
|
53
|
+
optional :concurrency, :enum, 1, 'dapr.proto.common.v1.StateOptions.StateConcurrency'
|
54
|
+
optional :consistency, :enum, 2, 'dapr.proto.common.v1.StateOptions.StateConsistency'
|
53
55
|
end
|
54
|
-
add_enum
|
56
|
+
add_enum 'dapr.proto.common.v1.StateOptions.StateConcurrency' do
|
55
57
|
value :CONCURRENCY_UNSPECIFIED, 0
|
56
58
|
value :CONCURRENCY_FIRST_WRITE, 1
|
57
59
|
value :CONCURRENCY_LAST_WRITE, 2
|
58
60
|
end
|
59
|
-
add_enum
|
61
|
+
add_enum 'dapr.proto.common.v1.StateOptions.StateConsistency' do
|
60
62
|
value :CONSISTENCY_UNSPECIFIED, 0
|
61
63
|
value :CONSISTENCY_EVENTUAL, 1
|
62
64
|
value :CONSISTENCY_STRONG, 2
|
63
65
|
end
|
64
|
-
add_message
|
66
|
+
add_message 'dapr.proto.common.v1.ConfigurationItem' do
|
65
67
|
optional :value, :string, 1
|
66
68
|
optional :version, :string, 2
|
67
69
|
map :metadata, :string, :string, 3
|
@@ -73,17 +75,17 @@ module Dapr
|
|
73
75
|
module Proto
|
74
76
|
module Common
|
75
77
|
module V1
|
76
|
-
HTTPExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
77
|
-
HTTPExtension::Verb = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
78
|
-
InvokeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
79
|
-
InvokeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
80
|
-
StreamPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
81
|
-
StateItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
82
|
-
Etag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
83
|
-
StateOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
84
|
-
StateOptions::StateConcurrency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
85
|
-
StateOptions::StateConsistency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
86
|
-
ConfigurationItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
78
|
+
HTTPExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.HTTPExtension').msgclass
|
79
|
+
HTTPExtension::Verb = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.HTTPExtension.Verb').enummodule
|
80
|
+
InvokeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.InvokeRequest').msgclass
|
81
|
+
InvokeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.InvokeResponse').msgclass
|
82
|
+
StreamPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.StreamPayload').msgclass
|
83
|
+
StateItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.StateItem').msgclass
|
84
|
+
Etag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.Etag').msgclass
|
85
|
+
StateOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.StateOptions').msgclass
|
86
|
+
StateOptions::StateConcurrency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.StateOptions.StateConcurrency').enummodule
|
87
|
+
StateOptions::StateConsistency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.StateOptions.StateConsistency').enummodule
|
88
|
+
ConfigurationItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup('dapr.proto.common.v1.ConfigurationItem').msgclass
|
87
89
|
end
|
88
90
|
end
|
89
91
|
end
|