Rename NewClientFromURI to NewInternalHTTPClientFromURI

This commit is contained in:
Yuce Tekol 2017-10-18 21:17:25 +03:00
parent 66650ec1f7
commit 642bf3180f
No known key found for this signature in database
GPG key ID: CB59E46D2FB90573
4 changed files with 5 additions and 5 deletions

View file

@ -61,11 +61,11 @@ func NewInternalHTTPClient(host string, options *ClientOptions) (*InternalHTTPCl
return nil, err
}
client := NewClientFromURI(uri, options)
client := NewInternalHTTPClientFromURI(uri, options)
return client, nil
}
func NewClientFromURI(defaultURI *URI, options *ClientOptions) *InternalHTTPClient {
func NewInternalHTTPClientFromURI(defaultURI *URI, options *ClientOptions) *InternalHTTPClient {
if options == nil {
options = &ClientOptions{}
}

View file

@ -56,7 +56,7 @@ func NewExecutor(clientOptions *ClientOptions) *Executor {
clientOptions = &ClientOptions{}
}
return &Executor{
client: NewClientFromURI(nil, clientOptions),
client: NewInternalHTTPClientFromURI(nil, clientOptions),
}
}

View file

@ -1506,7 +1506,7 @@ func (h *Handler) handlePostFrameRestore(w http.ResponseWriter, r *http.Request)
}
// Create a client for the remote cluster.
client := NewClientFromURI(host, h.ClientOptions)
client := NewInternalHTTPClientFromURI(host, h.ClientOptions)
// Determine the maximum number of slices.
maxSlices, err := client.MaxSliceByIndex(r.Context())

View file

@ -537,7 +537,7 @@ func (s *Server) createDefaultClient() {
if s.TLS != nil {
transport.TLSClientConfig = s.TLS
}
s.defaultClient = NewClientFromURI(nil, &ClientOptions{TLS: s.TLS})
s.defaultClient = NewInternalHTTPClientFromURI(nil, &ClientOptions{TLS: s.TLS})
}
// CountOpenFiles on opperating systems that support lsof