Explorar el Código

dont export tlsConfig

Chris Bannister hace 10 años
padre
commit
44795f75d3
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 3 3
      conn.go
  2. 1 1
      connectionpool.go

+ 3 - 3
conn.go

@@ -79,7 +79,7 @@ type ConnConfig struct {
 	Compressor    Compressor
 	Authenticator Authenticator
 	Keepalive     time.Duration
-	TLSConfig     *tls.Config
+	tlsConfig     *tls.Config
 }
 
 // Conn is a single connection to a Cassandra node. It can be used to execute
@@ -113,10 +113,10 @@ func Connect(addr string, cfg ConnConfig, pool ConnectionPool) (*Conn, error) {
 		conn net.Conn
 	)
 
-	if cfg.TLSConfig != nil {
+	if cfg.tlsConfig != nil {
 		// the TLS config is safe to be reused by connections but it must not
 		// be modified after being used.
-		if conn, err = tls.Dial("tcp", addr, cfg.TLSConfig); err != nil {
+		if conn, err = tls.Dial("tcp", addr, cfg.tlsConfig); err != nil {
 			return nil, err
 		}
 	} else if conn, err = net.DialTimeout("tcp", addr, cfg.Timeout); err != nil {

+ 1 - 1
connectionpool.go

@@ -206,7 +206,7 @@ func (c *SimplePool) connect(addr string) error {
 		Compressor:    c.cfg.Compressor,
 		Authenticator: c.cfg.Authenticator,
 		Keepalive:     c.cfg.SocketKeepalive,
-		TLSConfig:     c.tlsConfig,
+		tlsConfig:     c.tlsConfig,
 	}
 
 	conn, err := Connect(addr, cfg, c)