Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnection ¶
func NewConnection(cfg ClickHouseConfig) (driver.Conn, error)
NewConnection creates a new ClickHouse connection from the config.
Types ¶
type ClickHouseConfig ¶
type ClickHouseConfig struct {
Host string
Port int
Database string
User string
Password string
Secure bool // connect over native TLS (port 9440 by convention)
TLSSkipVerify bool // skip server certificate verification (internal-CA clusters)
// ShowSecrets enables the format_display_secrets_in_show_and_select session
// setting so create_table_query / SHOW CREATE / system.named_collections
// return real secret values (passwords, broker lists) instead of the
// redacted "[HIDDEN]" placeholder. It only takes effect when the server is
// configured with display_secrets_in_show_and_select = 1 and the connecting
// user holds the displaySecretsInShowAndSelect privilege; otherwise values
// stay redacted. Off by default so secrets are never captured into a dump
// unintentionally.
ShowSecrets bool
}
ClickHouseConfig holds the connection configuration for ClickHouse.
func GetDefaultConfig ¶
func GetDefaultConfig() ClickHouseConfig
GetDefaultConfig returns default configuration based on environment.
Click to show internal directories.
Click to hide internal directories.