diff options
Diffstat (limited to 'client.go')
| -rw-r--r-- | client.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -14,25 +14,25 @@ import ( // Client of Lilin server. type Client struct { - httpc *http.Client - Options ClientOptions + httpc *http.Client + Config ClientConfig } // NewClient create new client using the provided options. -func NewClient(opts ClientOptions) (client *Client, err error) { +func NewClient(cfg ClientConfig) (client *Client, err error) { var logp = `NewClient` client = &Client{ - Options: opts, + Config: cfg, } - err = client.Options.init() + err = client.Config.init() if err != nil { return nil, fmt.Errorf(`%s: %w`, logp, err) } client.httpc = &http.Client{ - Timeout: client.Options.Timeout, + Timeout: client.Config.Timeout, } return client, nil } @@ -41,7 +41,7 @@ func NewClient(opts ClientOptions) (client *Client, err error) { func (client *Client) ServicesSummary() (summary []Service, err error) { var logp = `ServicesSummary` - var reqURL = *client.Options.serverURL + var reqURL = *client.Config.serverURL reqURL.Path = pathAPIServicesSummary var httpReq = http.Request{ |
