New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Unix domain socket support #206
Conversation
afa1d83
to
98774e2
Compare
Codecov Report
@@ Coverage Diff @@
## main #206 +/- ##
==========================================
+ Coverage 63.14% 63.72% +0.58%
==========================================
Files 23 23
Lines 1305 1315 +10
==========================================
+ Hits 824 838 +14
+ Misses 405 402 -3
+ Partials 76 75 -1
Continue to review full report at Codecov.
|
9d515fc
to
6c47b09
Compare
Signed-off-by: Long <long0dai@foxmail.com>
Signed-off-by: Long <long.dai@intel.com>
@artursouza @yaron2 please review. |
First, the app instantiates Dapr client: | ||
|
||
```go | ||
client, err := dapr.NewClientWithSocket(socket) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why duplicating the whole example just for socket connection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes are here:
6d5
< "os"
16c15
< daprPort = "3500"
---
> socket = "/tmp/dapr-order-app-grpc.socket"
19,26d17
< var port string
<
< func init() {
< if port = os.Getenv("DAPR_GRPC_PORT"); len(port) == 0 {
< port = daprPort
< }
< }
<
36c27
< client, err := dapr.NewClientWithPort(port)
---
> client, err := dapr.NewClientWithSocket(socket)
Use patch in example is not common I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @yaron2
@yaron2 ping |
Fix #198
Signed-off-by: Long long0dai@foxmail.com