dapr / go-sdk

Dapr SDK for go
Apache License 2.0
446 stars 171 forks source link

Add PubSub event metadata #490

Closed jjcollinge closed 9 months ago

jjcollinge commented 10 months ago

Signed-off-by: Joni Collinge jonathancollinge@live.com

Description

Dapr can attach custom metadata to PubSub events which is currently not handled by the SDK. This PR adds a mapping to both the HTTP and gRPC logic to attach this custom metadata to the topic event so consumers can use it.

Issue reference

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (61158e8) 70.08% compared to head (e8d16a8) 70.26%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #490 +/- ## ========================================== + Coverage 70.08% 70.26% +0.18% ========================================== Files 35 35 Lines 2841 2859 +18 ========================================== + Hits 1991 2009 +18 Misses 738 738 Partials 112 112 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

daixiang0 commented 9 months ago

@jjcollinge thanks for your contribution!