dapr 0.1.18 → 0.1.19

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 +61 -9
  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: 799c05f8d8605bc143ba8a423cbcf141fb3b42f157efec50171fd071064b84e9
4
- data.tar.gz: 80d22d6b23ee2a1b035133702210d8fb9575a3cd7f56d4d6f9d80e0e9d61c3c0
3
+ metadata.gz: 67d8484ce4365b192ba1756fa63085371e3224370b500a341a3ca2428581a0d3
4
+ data.tar.gz: c97c4d0b0e40940039f83dc041a81897b958086ba38d1a96b560d6e86dc25874
5
5
  SHA512:
6
- metadata.gz: 67dfca3d49d95550858b5dbd5c55c2dc890db598d7e1e06da3ce126cba3ec492ba18cce0f46e53b992475a22ef9557ac8eab6b48513bf8ab2bb46f4ae4e85087
7
- data.tar.gz: 44402e4fdcbf197aeb5404254419f2caafd57e724ca648d3ad456fd85be71b2c24e25d313fa3e2fb06da8fedc53a97a5a109c01e4f4685c9f48f8d3dd456c0d3
6
+ metadata.gz: b19abf8c5983476ee14abfe9235fc84f34055a6ab49148bc9eef369a56ee20ca56e5f36e491e1de0e08c3c5cf85b3cb1bc4aad8696f442aaa21eb041f3e5f461
7
+ data.tar.gz: 565d9d2296feda65259fc5c0b30c5f462a6c44399ae97b7b3d1581751e541c9dc46fa9a1023bfe0924358b3ef870a5c857b17dd9b1263e03531606f8a286c47a
data/Readme.adoc CHANGED
@@ -6,7 +6,17 @@
6
6
  :caution-caption: :fire:
7
7
  :warning-caption: :warning:
8
8
  endif::[]
9
- :dapr-building-block: https://docs.dapr.io/concepts/building-blocks-overview/[Dapr Building Block]
9
+ :dapr-building-block: https://docs.dapr.io/concepts/building-blocks-concept/[Dapr Building Block]
10
+ :pubsub-block: https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-overview/[Dapr Pub/Sub Building Block]
11
+ :state-block: https://docs.dapr.io/developing-applications/building-blocks/state-management/state-management-overview/[Dapr State Management Building Block]
12
+ :actors-block: https://docs.dapr.io/developing-applications/building-blocks/actors/actors-overview/[Dapr Actor Building Block]
13
+ :binding-block: https://docs.dapr.io/developing-applications/building-blocks/bindings/bindings-overview/[Dapr Binding Building Block]
14
+ :secret-block: https://docs.dapr.io/developing-applications/building-blocks/secrets/secrets-overview/[Dapr Secret Building Block]
15
+ :configuration-block: https://docs.dapr.io/developing-applications/building-blocks/configuration/configuration-api-overview/[Dapr Configuration Building Block]
16
+ :distributed-lock-block: https://docs.dapr.io/developing-applications/building-blocks/distributed-lock/distributed-lock-api-overview/[Dapr Distributed Lock Building Block]
17
+ :workflow-block: https://docs.dapr.io/developing-applications/building-blocks/workflow/workflow-overview/[Dapr Workflow Building Block]
18
+ :cryptography-block: https://docs.dapr.io/developing-applications/building-blocks/cryptography/cryptography-overview/[Dapr Cryptography Building Block]
19
+
10
20
 
11
21
  == Overview
12
22
 
@@ -34,7 +44,11 @@ is a more opinionated and higher-level abstraction.
34
44
  Each {dapr-building-block} is exposed as a class under the `Rubyists::Dapr::Client` or
35
45
  `Rubyists::Dapr::Service` namespace.
36
46
 
37
- === Publish a message
47
+ === Pub/Sub
48
+
49
+ Implementation of {pubsub-block}
50
+
51
+ ==== Publish a message
38
52
 
39
53
  [source,ruby]
40
54
  ----
@@ -47,7 +61,7 @@ publisher.publish('topic-name', { message: 'Hello, Dapr!', from: 'Ruby' })
47
61
  <2> Create a new publisher for the `pubsub-name` pubsub component. This component must be defined in the Dapr runtime.
48
62
  <3> Publish a message to the `topic-name` topic.
49
63
 
50
- === Subscribe to topics
64
+ ==== Subscribe to topics
51
65
 
52
66
  Subscriptions in Dapr work a little different than you may be used to. Instead of subscribing to a topic
53
67
  then looping through consumed messages, you define a fully-fledged service that Dapr will
@@ -58,16 +72,54 @@ focus on the business logic of your service, rather than the plumbing of message
58
72
  ----
59
73
  require 'dapr/service/subscriber'
60
74
  handler = ->(event) { puts "Got event: #{event}" } <1>
61
- pubsub_name: 'pubsub' <2>
62
- sub = Rubyists::Dapr::Service::Subscriber.new(pubsub_name:, topics: 'TOPIC-A', handler: handler) <3>
63
- sub.start! <4>
75
+ pubsub_name = 'pubsub' <2>
76
+ topics = 'TOPIC-A' <3>
77
+ sub = Rubyists::Dapr::Service::Subscriber.new(pubsub_name:, topics:, handler:) <4>
78
+ sub.start! <5>
64
79
  ----
65
80
  <1> Define a handler that will be called for each message received. `event` will be a `CloudEvents::Event` instance.
81
+ +
82
+ NOTE: The handler can be anything that responds to `#call`, such as a lambda, proc, or instance. Sky's the limit! (Dependency injection, anyone?)
83
+ +
66
84
  <2> The name of the Dapr pubsub component this subscriber will utilize.
67
- <3> Create a new subscriber for the `pubsub` pubsub component, subscribing to the `TOPIC-A` topic.
68
- <4> Start the subscriber. This will block the current thread and call the handler for each message received.
85
+ <3> The name of the topic(s) to subscribe to.
86
+ +
87
+ TIP: Multiple topics can be subscribed to simultaneously by passing an array of topic names to the `topics` argument.
88
+ +
89
+ <4> Create a new subscriber for the `pubsub` pubsub component, subscribing to the `TOPIC-A` topic.
90
+ <5> Start the subscriber. This will block the current thread and call the handler for each message received.
91
+
92
+ === State Management
93
+
94
+ Implementation of {state-block}
95
+
96
+ === Actors
97
+
98
+ Implementation of {actors-block}
99
+
100
+ === Bindings
101
+
102
+ Implementation of {binding-block}
103
+
104
+ === Secrets
105
+
106
+ Implementation of {secret-block}
107
+
108
+ === Configuration
109
+
110
+ Implementation of {configuration-block}
111
+
112
+ === Distributed Lock
113
+
114
+ Implementation of {distributed-lock-block}
115
+
116
+ === Workflow
117
+
118
+ Implementation of {workflow-block}
119
+
120
+ === Cryptography
69
121
 
70
- TIP:: Multiple topics can be subscribed to simultaneously by passing an array of topic names to the `topics` argument.
122
+ Implementation of {cryptography-block}
71
123
 
72
124
  == Development
73
125
 
data/lib/dapr/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rubyists
4
4
  module Dapr
5
- VERSION = '0.1.18'
5
+ VERSION = '0.1.19'
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.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tj (bougyman) Vanderpoel