dapr 0.1.19 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/Readme.adoc +15 -7
  3. data/lib/dapr/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67d8484ce4365b192ba1756fa63085371e3224370b500a341a3ca2428581a0d3
4
- data.tar.gz: c97c4d0b0e40940039f83dc041a81897b958086ba38d1a96b560d6e86dc25874
3
+ metadata.gz: fdf83662412d807b7dc76ff2e4bd51bf2ebbad695a7662ec88033cea4c6d87ac
4
+ data.tar.gz: aeb5cc9b26d7060985e72e3211caf4187e3a46f5f4a4a05675e6711dca4e5350
5
5
  SHA512:
6
- metadata.gz: b19abf8c5983476ee14abfe9235fc84f34055a6ab49148bc9eef369a56ee20ca56e5f36e491e1de0e08c3c5cf85b3cb1bc4aad8696f442aaa21eb041f3e5f461
7
- data.tar.gz: 565d9d2296feda65259fc5c0b30c5f462a6c44399ae97b7b3d1581751e541c9dc46fa9a1023bfe0924358b3ef870a5c857b17dd9b1263e03531606f8a286c47a
6
+ metadata.gz: c8735f21119190abe0a6b907aba635fd60986af1472787c45f406adb71d58fe66a772b4a7915a74308d8807a97a2e7689fd7bdf16b50803e965c084b1c5838fb
7
+ data.tar.gz: d2f8fe56cab2649512debdfc09ef3eb99cbda0f9edde1108a8b8dbe9f9c1307df5b813b8ebf3cd07f295c88587161058df22404d8bc66578049b9f2ba51e5cf2
data/Readme.adoc CHANGED
@@ -36,11 +36,17 @@ If bundler is not being used to manage dependencies, install the gem by executin
36
36
 
37
37
  == Usage
38
38
 
39
- Dapr being such a kitchen sink, the client exposes each dapr building block as either a
40
- client or a service, depending on whether it uses the AppCallback runtime (Service) or
41
- the Dapr API (Client). The clients art thin wrappers around the Dapr API, while the service
42
- is a more opinionated and higher-level abstraction.
39
+ Dapr being such a kitchen sink, this library exposes each {dapr-building-block} as either a
40
+ Client or a Service, depending on whether it uses the AppCallback runtime (Service) or
41
+ the Dapr API (Client). The clients are thin wrappers around the Dapr API, while the service
42
+ implementations will be more opinionated, higher-level abstractions. See the specific section on
43
+ the building block you are interested in for its usage information.
43
44
 
45
+ == Building Blocks
46
+
47
+ === Namespace Convention
48
+
49
+ In order to avoid conflicts with any other `Dapr` top level namespace(s),
44
50
  Each {dapr-building-block} is exposed as a class under the `Rubyists::Dapr::Client` or
45
51
  `Rubyists::Dapr::Service` namespace.
46
52
 
@@ -55,17 +61,19 @@ Implementation of {pubsub-block}
55
61
  require 'dapr/client/publisher'
56
62
  ENV['DAPR_GRPC_PORT'] = '3500' <1>
57
63
  publisher = Rubyists::Dapr::Client::Publisher.new('pubsub-name') <2>
58
- publisher.publish('topic-name', { message: 'Hello, Dapr!', from: 'Ruby' })
64
+ publisher.publish('topic-name', { message: 'Hello, Dapr!', from: 'Ruby' }) <3>
59
65
  ----
60
66
  <1> Set the Dapr gRPC port to the Dapr runtime port. (This is automatically set in kubernetes environments)
61
67
  <2> Create a new publisher for the `pubsub-name` pubsub component. This component must be defined in the Dapr runtime.
62
- <3> Publish a message to the `topic-name` topic.
68
+ <3> Publish a message to the `topic-name` topic. The message can be any Ruby object that can be serialized to JSON.
69
+ +
70
+ TIP: JSON is our default serializer. To use a different serializer, you can pass a `serializer:` argument to the publisher's initializer
63
71
 
64
72
  ==== Subscribe to topics
65
73
 
66
74
  Subscriptions in Dapr work a little different than you may be used to. Instead of subscribing to a topic
67
75
  then looping through consumed messages, you define a fully-fledged service that Dapr will
68
- send each message to in the topic(s) that you specify. This unique appreach allows you to
76
+ send each message to in the topic(s) that you specify. This unique approach allows you to
69
77
  focus on the business logic of your service, rather than the plumbing of message consumption.
70
78
 
71
79
  [source,ruby]
data/lib/dapr/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubyists
4
4
  module Dapr
5
- VERSION = '0.1.19'
5
+ VERSION = '0.1.21'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dapr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tj (bougyman) Vanderpoel