diff options
| author | Shulhan <ms@kilabit.info> | 2025-07-25 02:30:37 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-07-29 00:31:23 +0700 |
| commit | 0537c5e094c7b6e5ff376ccdf0dba80adf5c4342 (patch) | |
| tree | b8c2c3621c1e76c5182acdc2f09291b796792a9e /client_options.go | |
| parent | 3d4c7b48674cd553ce8f670933af9b609992ae77 (diff) | |
| download | lilin-0537c5e094c7b6e5ff376ccdf0dba80adf5c4342.tar.xz | |
all: refactoring Service to create with ServiceOptions
Instead of defining the options in the Service, create it in the
ServiceOptions and pass it to NewService function.
In this way, we can check it, initialize it, and set default value.
The Address option now use URL with scheme, so we can derive the
service type based on the scheme, for example "http://" for HTTP based
service, "tcp://xxx" for TCP based service, and so on.
Diffstat (limited to 'client_options.go')
| -rw-r--r-- | client_options.go | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/client_options.go b/client_options.go index 477bcb7..3203478 100644 --- a/client_options.go +++ b/client_options.go @@ -9,8 +9,6 @@ import ( "time" ) -const defTimeout = 5 * time.Second - // ClientOptions options for client. type ClientOptions struct { serverURL *url.URL |
