config

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 8 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL