// NewClient creates a new Client with the given endpoint and options.
NewClient creates a new Client with the given endpoint and options.
// NewClient creates a new Client with the given endpoint and options .
func NewClient(endpoint string, opts ...ClientOption) (*Client, error) {
	u, err := parseEndpoint(endpoint)
	if err != nil {
		return nil, err
	}
	o := new(clientOptions)
	if err := o.apply(opts); err != nil {
		return nil, err
	}
	tr, err := o.getTransport(endpoint)
	if err != nil {
		return nil, err
	}
	return &Client{
		client:    newClient(tr),
		endpoint:  u,
		retryFunc: o.retryFunc,
		opts:      opts,
	}, nil
}
func NewClient ( endpoint string , opts ... ClientOption ) ( * Client , error ) { u , err := parseEndpoint ( endpoint ) if err != nil { return nil , err } o := new ( clientOptions ) if err := o . apply ( opts ) ; err != nil { return nil , err } tr , err := o . getTransport ( endpoint ) if err != nil { return nil , err } return & Client { client : newClient ( tr ) , endpoint : u , retryFunc : o . retryFunc , opts : opts , } , nil }
NewClient creates a new Client with the given endpoint and options.
NewClient creates a new Client with the given endpoint and options .
// Retrieve transport from options.