Documentation ¶
Overview ¶
Package clickhouseinfra provides a set of functions to interact with ClickHouse containers.
Index ¶
Constants ¶
const (
SecureNativePort = nat.Port("9440/tcp")
)
Variables ¶
This section is empty.
Functions ¶
func WithCerts ¶ added in v0.2.0
func WithCerts(caCert, clientCerts *tlscert.Certificate) testcontainers.CustomizeRequestOption
WithCerts is a customize request option that adds the certificates to the clickhouse container.
Types ¶
type Container ¶
type Container struct { *chmodule.ClickHouseContainer RootCAs *x509.CertPool }
Container is a struct that holds the clickhouse and zookeeper containers.
func CreateClickHouseContainer ¶
CreateClickHouseContainer function starts and testcontainer for clickhouse. The caller is responsible for terminating the container.
func (*Container) ConnectionHost ¶ added in v0.2.0
ConnectionHost returns the host and port of the clickhouse container, using the default, native 9000 port, and obtaining the host and exposed port from the container
func (*Container) GetClickHouseAsConn ¶ added in v0.2.0
GetClickHouseAsConn function returns a clickhouse.Conn connection which uses native ClickHouse protocol.
func (*Container) GetClickhouseAsDB ¶ added in v0.2.0
GetClickhouseAsDB function returns a sql.DB connection which allows interfaceing with the stdlib database/sql package.