You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,27 @@ func main() {
36
36
}
37
37
```
38
38
39
+
`NewClient` function has a default timeout for 5s, but you can customize this timeout by setting the environment variable `DAPR_CLIENT_TIMEOUT_SECONDS`.
40
+
For example:
41
+
```go
42
+
package main
43
+
44
+
import (
45
+
"os"
46
+
47
+
dapr "github.com/dapr/go-sdk/client"
48
+
)
49
+
50
+
funcmain() {
51
+
os.Setenv("DAPR_CLIENT_TIMEOUT_SECONDS", "3")
52
+
client, err:= dapr.NewClient()
53
+
if err != nil {
54
+
panic(err)
55
+
}
56
+
defer client.Close()
57
+
}
58
+
```
59
+
39
60
Assuming you have [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr/) installed, you can then launch your app locally like this:
0 commit comments