dapr 0.1.20 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/Readme.adoc +14 -6
- data/lib/dapr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8484048493bf83c016231bb89e2cf182eb5a6ed7a4701c0e0d123f441ebe00c2
|
4
|
+
data.tar.gz: 80e2bdd2d0fd05e80ab53689ec52c0bcef75497c018414b5c78386e84c828b98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd4af672f11224af264d3ef8ce1a1a88df4d58c45e2378d2af38a83f92ae2c414f75160e38833d8b36ce08337741e9938ac74b0f8e4be7fcf9499ebc604c9ea0
|
7
|
+
data.tar.gz: a446be5f5a79c39c2662fa3597d4a4cc1bec1e0819cf398e741e1d5e159f6fdc548855169ce9de0856e9c852b0a7d3074be973d7b8fb661ef9d312d6132ae0ce
|
data/.rubocop.yml
CHANGED
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,
|
40
|
-
|
41
|
-
the Dapr API (Client). The clients
|
42
|
-
|
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,11 +61,13 @@ 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
|
|
data/lib/dapr/version.rb
CHANGED