F21 commented on a change in pull request #43: add Connector implementation
URL: https://github.com/apache/calcite-avatica-go/pull/43#discussion_r306269190
 
 

 ##########
 File path: driver.go
 ##########
 @@ -47,10 +47,18 @@ import (
 // Driver is exported to allow it to be used directly.
 type Driver struct{}
 
-// Open a Connection to the server.
-// See https://github.com/apache/calcite-avatica-go#dsn for more information
-// on how the DSN is formatted.
-func (a *Driver) Open(dsn string) (driver.Conn, error) {
+// Connector implements the driver.Connector interface
+type Connector struct {
+       additionalInfos   map[string]string
+       additionalHeaders map[string]string
 
 Review comment:
   That sounds like a good idea, if no http client is supplied, we can 
instantiate a new client (from the existing code). If it is supplied, we do not 
modify the http client at all.
   
   To improve the user experience, we can extract these 2 branches into public 
functions that takes a `http.Client` and makes changes to them 
(https://github.com/apache/calcite-avatica-go/blob/master/http_client.go#L98): 
`AddDigestAuthenticationCredentialsToHTTPClient` and 
`AddKerberosCredentialsToHTTPClient`. That way, anyone who supplies his own 
http client gets to use digest or kerberos auth without having to write most of 
the code themselves.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to