diff options
| author | Shulhan <ms@kilabit.info> | 2025-07-12 17:49:23 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-07-12 17:49:23 +0700 |
| commit | dba7aa16a4df5e89c2aea5cec1d07609f468de82 (patch) | |
| tree | ed328a4867e02693f4a4bb13cea140ec3cea7cf6 /client_options.go | |
| parent | ba54e6bc9aa20a1cbf2a3604345c830305449f7b (diff) | |
| download | duitku-dba7aa16a4df5e89c2aea5cec1d07609f468de82.tar.xz | |
all: add option Timeout to Client
The Timeout option affect how long the client wait for connect and waiting
for response.
Diffstat (limited to 'client_options.go')
| -rw-r--r-- | client_options.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client_options.go b/client_options.go index fa6ad1c..2bdbffe 100644 --- a/client_options.go +++ b/client_options.go @@ -7,6 +7,7 @@ import ( "fmt" "net/url" "os" + "time" "github.com/shuLhan/share/lib/ini" ) @@ -33,6 +34,9 @@ type ClientOptions struct { // DisburseUserID user ID for disbursement request. DisburseUserID int64 `ini:"duitku::disburse_user_id"` + + // Timeout for connection and response. + Timeout time.Duration } // LoadClientOptions load ClientOptions from file. |
