Commit Graph

3297 Commits

Author SHA1 Message Date
Joni Collinge d62e2a9e84 use context.Background() in eventhubs subscriber 2020-11-03 08:29:00 +00:00
Joni Collinge d2016a2e2d
Merge branch 'master' into jjcollinge/pubsub-context 2020-11-02 18:19:48 +00:00
Joni Collinge 7ea3800afd fix lint 2020-11-02 17:20:29 +00:00
AbserAri d09758b502
add ackoptions for nats (#511)
* add ackoptions for nats

* remove redundent variable as golint.

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-11-02 07:59:58 -08:00
Joni Collinge a1ed1c1662 update pubsub and mqtt 2020-11-02 09:54:54 +00:00
Joni Collinge 2e6b84ae40 Merge remote-tracking branch 'origin/master' into jjcollinge/pubsub-context 2020-11-02 09:05:16 +00:00
Aaron Crawfis a27e486ef9
Update docs with new docs links (#513) 2020-10-26 11:52:20 -07:00
Stepan 5e9140f1db
Adding force https metadata key (#487)
* adding force https metadata and its handler code

* make https a const; change ForceHTTPS to lowercase before compare with true

* replacing strings.ToLower with strings.EqualFold due to lint error in Build linux_amd64 binaries check

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-10-22 14:51:07 -07:00
Sky/敖小剑 ed7480237d
Upgrade grpc version to v1.32.0 (#501)
* remove etcd state store to prepare to update grpc to new version

* upgrade grpc version to v1.32.0

* upgrade grpc version to v1.32.0
2020-10-15 17:49:33 -07:00
Sky/敖小剑 4e77594a4d
remove etcd state store to prepare to update grpc to new version (#499)
* remove etcd state store to prepare to update grpc to new version

* update go.mod

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-10-15 09:53:49 -07:00
Yaron Schneider df5be19205
add close method to event hubs pub/sub (#500) 2020-10-15 08:42:14 -07:00
Artur Souza 5aafec3d5f
Adds instructions for release notes in issue templates. (#497) 2020-10-14 20:22:19 -07:00
Carlos Mendible 2ae711d3e0
removing cloudkms secret store #495 (#496) 2020-10-13 16:16:45 -07:00
Yaron Schneider 182d204111
Add close method to pub/sub (#494)
* add close method to pub/sub

* linter
2020-10-12 19:06:33 -07:00
halspang f647d9eedb
Upgrade golang lint to 1.31 (#490)
Upgrade golang lint to 1.31.0

https://github.com/dapr/components-contrib/issues/439
2020-10-12 12:54:15 -07:00
Young Bu Park 83ee60e010
Update component-contrib update commands (#493)
Update component-contrib update commands
2020-10-09 16:16:57 -07:00
Michael Collins b08e920cdd
Apns output binding (#481)
* Create Apple Push Notification Output Binding

I created the apns package and created apns.go to implement the output
binding to send push notifications to Apple devices using the Apple Push
Notification Service.

* Refactor Code

I refactored and cleaned up the source code in apns.go. I made the code
easier to read and understand. I split out the JWT generation into
authorization_builder.go. I split out the create operation code into
create_operation.go and refactored it to follow a pipeline pattern.

I created doc.go and added documentation for how to use the APNS binding
to send push notifications to Apple devices.

* Fix Lint Issuer

I corrected issues reported by golangci-lint in the pull request. I ran
gofumpt against the test cases for the APNs binding. I fixed a naming
error in create_operation.go.

* Address Review Comment

I revised extractKeyID in apns.go to address a readability concern in
the code. I simplified the if/else block to make the logic easier to
understand.

* Add License Header to APNs Binding

I added the standard Microsoft copyright and MIT license header to the
source files for the APNs binding. This was requested from the PR
review.

* Revise APNS.extractTeamID for Readability

Per a PR comment, I revised the APNS.extractTeamID function to make the
function more readable.

* Revise APNS Create Operation

I revised the APNS create operation based on discussions in the PR
(#481). I deleted create_operation.go and merged the code back into the
main APNS type to simplify the code.

* Fix Linter Errors

I fixed linter errors reported in apns.go.

* Fix Code Review Comments

I switched from using encoding/json for JSON encoding and decoding to
using jsoniter.

I updated authorization_builder.go to define the expiration period as a
constant and provided a comment describing the need for and use of the
expiration period.

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Mark Chmarny <mchmarny@users.noreply.github.com>
Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-10-09 10:26:44 -07:00
Yaron Schneider 2c403ad238
Add method to unregister exporters (#491)
* add unregister method to exporters

* go.sum
2020-10-08 10:03:49 -07:00
Jack M 1a5a72e4a9
Fixed #488 - Update state store list in readme. (#489)
Co-authored-by: Jack M <root@exegete.me>
2020-10-06 11:16:44 -07:00
Artur Souza ab1ff1055a
Fixing bug where trx del in redis fails without etag. (#482) (#484) 2020-09-26 18:24:12 -07:00
Ori Zohar 594b81faa8
Update Readme.md (#479)
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-09-25 15:47:46 -07:00
Ori Zohar 6daf925cf9
Update and rename OWNERS to CODEOWNERS (#478) 2020-09-25 15:27:33 -07:00
Mark Chmarny fbc3a3dd87
RethinkDB state store support (#423)
* rethinkdb state store

* added actor state change binding

* updated db record

* reconnect

* passing lint

* updated binding repsonse keys

* rethinkdb load test

* lint validated tests

* updated comments

* updates TransactionalStateRequest

* parameterized table

* correct error message

Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-09-24 16:19:14 -07:00
Yaron Schneider 653bdced85
add metadata to pubsub message (#477)
Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-09-24 12:04:42 -07:00
Mark Chmarny d8035411f7
cleaner tests (#476) 2020-09-24 11:56:21 -07:00
Yaron Schneider 1e92e0e8e1
Add blob url to azure blob create (#474)
* add blob url to azure blob create

* add missing err statement
2020-09-23 17:42:46 -07:00
Mark Chmarny d2dcd8e508
Bi-directional output binding for PostgreSQL (#468)
* wip: postgres

* postgres crud binding

* CRUD postgres bidirectional output binding

* live test setup comments

* updated example conn string

* lint fixes

* test sql linting

* pr review updates

* lint fixes

* comment spelling

* metadata optional for close
2020-09-23 17:19:37 -07:00
Artur Souza 5b88ef7ec9
Update github.com/a8m/documentdb to latest commit to fix consistency … (#475)
* Update github.com/a8m/documentdb to latest commit to fix consistency level options.

* go mod tidy
2020-09-23 16:55:32 -07:00
Yaron Schneider b91469732c
Add get operation for azure blob storage binding (#473)
* add get operation for azure blob storage binding

* fix retry count

* make retry configurable, add default
2020-09-23 15:00:34 -07:00
Nghia Tran e51cff7fec
Use concurrency control in Multi() (#466)
Change Multi() to use same setQuery and delQuery mechanisms as Set() and Delete().
2020-09-22 15:13:39 -07:00
Mohammad Taghavi e5a50cb2da
add decodeBase64 option to azure blob storage component (#393)
* add decodeBase64 option to azure blob storage component

* fix lint error

* Apply suggestions from code review

some code improvements (apply review suggestion)

Co-authored-by: Nghia Tran <tcnghia@gmail.com>

* add comment to help assure the reader (resolve review comment)

Co-authored-by: Mohammad Taghavi <Mohammad.Taghavi@plan-b-gmbh.com>
Co-authored-by: Nghia Tran <tcnghia@gmail.com>
Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-09-22 13:44:36 -07:00
Nghia Tran 677645e191
Add CodeCov GitHub Action (#467)
* Add CodeCov GitHub Action

* Address Sundar's comment about blocking on coverage.

Since currently testing of components-contrib usually require building
with dapr/dapr, we don't yet have a lot of coverage. So we shouldn't
block PRs based on that.
2020-09-22 12:57:00 -07:00
Young Bu Park dd888565d7
Fix Dapr home bin directory. (#464) 2020-09-18 18:44:35 -07:00
Mukundan Sundararajan d2ee3200cd
Properly handle serialization deserizliation for redis transaction api. (#460)
* Properly handle serialization deserizliation for redis, postgres transaction api.

* Convert marshaler to a utils function.

* Add license comment

* init error inline
2020-09-15 12:54:29 -07:00
AbserAri 2b1103ec9f
Redis failover feature (#459)
* update logger form nats-io's to dapr's

* run go mod tidy and go mod delete the nats-io gnatsd

* update rabbitmq prefetch feature because want to set each instance the number of messages could  hold in once until ack.

* update for parse int

* update parseMetadata of rabbitMQ to read prefetchCount by string.

* [update rabbitMQ binding parseMetadata] Make error clear

* update the redis failover metadata

* [in rabbitMQ metadata parse] fix the bug of golint

* [redis statestore failover feature] add new client logic.

* update redis metadata as advice.

maligned struct of size 80 bytes could be of size 72 bytes.

* update rabbitMQ with a new parseMetadata way.

* omit comparison to bool constant as golangci-lint.

* [typo] matser -> master

* Revert "Merge branch 'master' of https://github.com/dapr/components-contrib into dapr-master"

This reverts commit 9a91bccc4b, reversing
changes made to 7e0cb1fa2d.

* Revert "Revert "Merge branch 'master' of https://github.com/dapr/components-contrib into dapr-master""

This reverts commit 110ef82681.

* Revert "Merge branch 'master' of https://github.com/dapr/components-contrib into dapr-master"

This reverts commit 9a91bccc4b, reversing
changes made to 7e0cb1fa2d.

* solve the conflct

* merge from the master to accept the change

* remove the defaultFailover as the reviewed.

* move newclient to function

* Update state/redis/redis.go

Co-authored-by: Nghia Tran <tcnghia@gmail.com>

* update comment to /* #nosec  */

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Nghia Tran <tcnghia@gmail.com>
2020-09-14 17:14:52 -07:00
Richard Simpson 775bbebc6a
feat(middleware): add opa middleware (#456)
* feat(middleware): add opa middleware

* address linting feedback

* unwind logic a little more

* are we gonna need to throw hands lint?

* remove accidental assertion lib include

* address pr feedback

* expand test suite to headers

* fix errors and moar test

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-09-12 12:29:42 -07:00
AbserAri 04ce9b8299
make rabbitMQ input binding could configure the Qos of Consumer. (#457)
* update logger form nats-io's to dapr's

* run go mod tidy and go mod delete the nats-io gnatsd

* update rabbitmq prefetch feature because want to set each instance the number of messages could  hold in once until ack.

* update for parse int

* update parseMetadata of rabbitMQ to read prefetchCount by string.

* [update rabbitMQ binding parseMetadata] Make error clear

* [in rabbitMQ metadata parse] fix the bug of golint

* update rabbitMQ with a new parseMetadata way.

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-09-08 13:15:11 -07:00
Artur Souza fbd04241b0
Adding PubSub response type. (#453) 2020-09-04 12:59:43 -07:00
Leon Mai 857d5652bd
Use metadata at top level instead of per request (#452)
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-09-04 09:56:27 -07:00
AbserAri 26b085baba
update logger form nats-io's to dapr's (#449)
* update logger form nats-io's to dapr's

* run go mod tidy and go mod delete the nats-io gnatsd

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-09-03 18:58:34 -07:00
Mayank Kumar 7f9850a04f
Improve mqtt pubsub for multiple topics (#443)
- Listen on multiple topics when those are provided for subscription.
- Improve the current logic to use dedicated function from paho client.
2020-09-03 10:17:27 -07:00
Mark Chmarny 5fdcbe9fe5
refactors local secret, adds env var imp dapr issue #1961 (#444)
* refactors local secret, adds env var imp

* env store test

* removed unused test const
2020-08-25 12:26:25 -07:00
Brightside Automation c344f68718 Merge branch 'master' into jjcollinge/pubsub-context 2020-08-19 14:46:03 +01:00
Mukundan Sundararajan c6623da87e
Change Kubernetes client to official go-client in the events binding. (#436)
* Change Kubernetes client to official go-client in the events binding.

* Change adding flags to init

* go mod tidy

* Proper call for handler

* Remove commented out code

* Refactor indentation
2020-08-18 11:49:06 -07:00
Geert Baeke 467375c254
Influx binding (#401)
* influx binding

* corrected linting errors

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-08-17 12:45:58 -07:00
Yaron Schneider 677e551844
fix consumer exclusivity (#435) 2020-08-17 07:37:25 -07:00
Florian Wagner e60fa843f2
Adding middleware component for non interactive oauth2 client credentials flow (#431)
* Initial commit with mock not working

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* changed structure for mocking, added first test

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* oauth2clientcredentials input checks and tests

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* rename metadata authHeaderName to HeaderName

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* Run 'go mod tidy'

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* use dapr logger from caller

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

* Fix additional lint requirements by build pipeline

Signed-off-by: Florian Wagner <flwagner@microsoft.com>

Co-authored-by: Florian Wagner <flwagner@microsoft.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-08-16 11:05:24 -07:00
Mayank Kumar f5f807ca73
Add pubsub support for mqtt over TLS (#429)
* Add pubsub support for mqtt over TLS

* Update mqtt host to include uri scheme.

- This is required to identify mode of connection used while
  connecting to broker.

* Add pubsub support for mqtt over TLS.

- add validation while initialisation.
- update test cases.
2020-08-16 11:01:12 -07:00
Leon Mai 08d2538796
Corresponding changes for multi pubsub (#434)
* Corresponding changes for multi pubsub

* Fix quote
2020-08-14 11:05:51 -07:00
Young Bu Park 3efcb40430
Upgrade Go to 1.15 (#432)
* Upgrade Go to 1.15

* fix string conversion warn
2020-08-12 10:22:48 -07:00