Skip to content

Commit 6ad1cfe

Browse files
committed
Removing the checks on the optional inputs
1 parent 8678980 commit 6ad1cfe

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

connection_producer.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ func (c *couchbaseCapellaDBConnectionProducer) Init(ctx context.Context, initCon
6464
}
6565

6666
switch {
67-
case len(c.Hosts) == 0:
68-
return nil, fmt.Errorf("hosts cannot be empty")
69-
case len(c.Username) == 0:
70-
return nil, fmt.Errorf("username cannot be empty")
71-
case len(c.Password) == 0:
72-
return nil, fmt.Errorf("password cannot be empty")
67+
case len(c.ClusterID) == 0:
68+
return nil, fmt.Errorf("cluster_id cannot be empty")
69+
case len(c.AccessKey) == 0:
70+
return nil, fmt.Errorf("access_key cannot be empty")
71+
case len(c.SecretKey) == 0:
72+
return nil, fmt.Errorf("secret_key cannot be empty")
7373
}
7474

7575
if c.TLS {
@@ -83,6 +83,7 @@ func (c *couchbaseCapellaDBConnectionProducer) Init(ctx context.Context, initCon
8383
}
8484

8585
c.Initialized = true
86+
verifyConnection = false // TBD: Check the cluster status with public APIs and don't make the connection
8687

8788
if verifyConnection {
8889
if _, err := c.Connection(ctx); err != nil {

0 commit comments

Comments
 (0)