Community driven, reusable components for distributed apps
Go to file
Josh van Leeuwen d098e38d6a
Propagate context from caller to appropriate places in the code (#2474)
* Propagates contexts to callers where appropriate.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Updates units tests with new func signature

Signed-off-by: joshvanl <me@joshvanl.dev>

* Fix linting errors

Signed-off-by: joshvanl <me@joshvanl.dev>

* Add atomic gate to alicloud rocketmq close channel.

Signed-off-by: joshvanl <me@joshvanl.dev>

* bindings/aws/kinesis use a separate ctx variable name

Signed-off-by: joshvanl <me@joshvanl.dev>

* binding/kafka: use atomic to prevent closing the channel twice

Signed-off-by: joshvanl <me@joshvanl.dev>

* bindings/mqtt3: use atomic bool to prevent close channel being closed multiple times

Signed-off-by: joshvanl <me@joshvanl.dev>

* bindings/mqtt3: use Background context for handle operations:w

Signed-off-by: joshvanl <me@joshvanl.dev>

* state/cocroachdb: add context to Ping()

Signed-off-by: joshvanl <me@joshvanl.dev>

* bindings/postgres: add comment explaining use of context.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Adds comment header to health/pinger.go

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/aws/snssqs: add waitgroup to wait for all go routines to finish
and block on Close(). Shuts down the subscription if there are no topic
handlers.

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/mqtt3: add atomic bool to prevent multiple channel closes. Add
wait group to block close on all goroutines to finish.

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/rabbitmq: fixes race conditions, uses atomic to prevent multiple
closes, add wait group to block close on all goroutines

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/redis: revert ctx passed when it could be cancelled. Add wait
group wait when closing.

Signed-off-by: joshvanl <me@joshvanl.dev>

* state/postges: pass context in init, and wait group on close.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Update all `Ping()` to `PingContext()` where possible.

Signed-off-by: joshvanl <me@joshvanl.dev>

* state/in-memory: add atomic bool to prevent closing channel multiple
times. Add wait group to block on close()

Signed-off-by: joshvanl <me@joshvanl.dev>

* state/mysql: don't use same ctx variable name

Signed-off-by: joshvanl <me@joshvanl.dev>

* Pass correct loop context to redis go routines

Signed-off-by: joshvanl <me@joshvanl.dev>

* Rename context when creating timeouts in state

Signed-off-by: joshvanl <me@joshvanl.dev>

* Remove state.Features() from requiring a context

Signed-off-by: joshvanl <me@joshvanl.dev>

* Revert wasm request handle Close func to be without context to
implement io.Closer interface. Add 5 second timeout. Add io.Closer
assertion in test.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Remove superfluous go lint vet directive

Signed-off-by: joshvanl <me@joshvanl.dev>

* Change Configuration Init function to take context

Signed-off-by: joshvanl <me@joshvanl.dev>

* Updates input binding interface to include a `Close() error` function. `Close`
blocks until all resources have been released and go routines have returned.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Change `Close() error` in input binding struct to `io.Closer` interface.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Update go.mod files to point to dapr/dapr PR https://github.com/dapr/dapr/pull/5831

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/redis: watch closeCh to shutdown worker instead of init context.

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/aws/snssqs + bindings/kubemq: ensure closeCh is caught so Close
correctly returns

Signed-off-by: joshvanl <me@joshvanl.dev>

* Close kubemq binding client on close. Ensure kafka consumer channel
cannot be closed more than once.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Tweaks

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Fixed cert tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* binding/mqtt3: add inline Background context instead of passing to
handleMessage

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/mqtt3: remove context from createSubscriberClientOptions

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/mqtt3: Remove `ResetConnection` func

Signed-off-by: joshvanl <me@joshvanl.dev>

* pubsub/kafka: Don't resubscribe if Subscribe is cancelled.

Signed-off-by: joshvanl <me@joshvanl.dev>

* binding/mqtt3: don't use context to control establishing connection

Signed-off-by: joshvanl <me@joshvanl.dev>

* bindings/mqtt3: Fix linting errors

Signed-off-by: joshvanl <me@joshvanl.dev>

---------

Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2023-02-16 14:18:35 -08:00
.build-tools Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
.devcontainer Updated devcontainer.json 2023-01-31 23:16:50 +00:00
.github Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
bindings Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
configuration Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
contenttype update license to Apache v2.0 (#1406) 2022-01-04 19:53:31 -08:00
docs Fix ordering in docs 2022-10-27 14:04:13 +02:00
health Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
internal Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
lock Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
metadata Changed SQLite metadata parsing per review feedback 2023-02-08 23:05:01 +00:00
middleware Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
nameresolution mdns: shut down on context cancelation and not on signal 2023-01-26 12:15:37 -08:00
pubsub Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
secretstores Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
state Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
tests Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
workflows Updating workflows request struct 2022-11-14 12:39:35 -07:00
.codecov.yaml Updated codecov Action to v3 and reduce email spam (#1936) 2022-08-04 17:28:54 -07:00
.gitignore Fix Azure Service Bus cert/conf tests (#2218) 2022-10-24 15:05:36 -07:00
.golangci.yml Merge branch 'dapr:master' into master 2022-11-11 23:34:39 +02:00
CODEOWNERS Update CODEOWNERS (#987) 2021-07-08 22:19:32 -07:00
CONTRIBUTING.md Add DCO requirements and updated code of conduct (#1395) 2022-01-04 09:40:04 -08:00
LICENSE update license to Apache v2.0 (#1406) 2022-01-04 19:53:31 -08:00
Makefile Merge branch 'master' of https://github.com/dapr/components-contrib into s3-fix 2023-01-10 14:47:10 -08:00
README.md Includes image of contributors in Readme.md (#2083) 2022-09-14 18:28:44 -07:00
SECURITY.md Add SECURITY.md (#1027) 2021-07-30 11:49:56 -07:00
component-metadata-schema.json Adding in missing component metadata schema file addition for workflows 2022-10-24 21:10:19 -06:00
go.mod Propagate context from caller to appropriate places in the code (#2474) 2023-02-16 14:18:35 -08:00
go.sum Add schema support to apache pulsar (#2475) 2023-01-26 13:10:58 -08:00

README.md

Components Contrib

Build Status Discord License: Apache 2.0 FOSSA Status

The purpose of Components Contrib is to provide open, community-driven, reusable components for building distributed applications. These components are being used by the Dapr project, but are separate and decoupled from it.

Using components developers can interact with bindings, state stores, messaging systems and more, without caring about the underlying implementation.

Available component types:

For documentation on how components are being used in Dapr in a language/platform agnostic way, visit Dapr Docs.

Contribution

Thanks to everyone who has contributed!

Code of Conduct

Please refer to our Dapr Community Code of Conduct