You've already forked go-clickhouse
mirror of
https://github.com/uptrace/go-clickhouse.git
synced 2025-07-17 01:12:33 +02:00
chore: improve auto-create database
This commit is contained in:
@ -29,6 +29,7 @@ type Config struct {
|
||||
User string
|
||||
Password string
|
||||
Database string
|
||||
Cluster string
|
||||
|
||||
DialTimeout time.Duration
|
||||
TLSConfig *tls.Config
|
||||
@ -151,6 +152,12 @@ func WithDatabase(database string) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func WithCluster(cluster string) Option {
|
||||
return func(db *DB) {
|
||||
db.conf.Cluster = cluster
|
||||
}
|
||||
}
|
||||
|
||||
// WithDialTimeout configures dial timeout for establishing new connections.
|
||||
// Default is 5 seconds.
|
||||
func WithDialTimeout(timeout time.Duration) Option {
|
||||
|
Reference in New Issue
Block a user