Documentation ¶
Overview ¶
Package clickhouseinfra provides a set of functions to interact with ClickHouse containers.
Index ¶
- func GetClickHouseAsConn(container *chmodule.ClickHouseContainer) (clickhouse.Conn, error)
- func GetClickhouseAsDB(ctx context.Context, container *chmodule.ClickHouseContainer) (*sql.DB, error)
- func StartZooKeeperContainer(ctx context.Context) (testcontainers.Container, string, error)
- type ColInfo
- type Container
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClickHouseAsConn ¶
func GetClickHouseAsConn(container *chmodule.ClickHouseContainer) (clickhouse.Conn, error)
GetClickHouseAsConn function returns a clickhouse.Conn connection which uses native ClickHouse protocol.
func GetClickhouseAsDB ¶
func GetClickhouseAsDB(ctx context.Context, container *chmodule.ClickHouseContainer) (*sql.DB, error)
GetClickhouseAsDB function returns a sql.DB connection which allows interfaceing with the stdlib database/sql package.
Types ¶
type Container ¶
type Container struct { *chmodule.ClickHouseContainer ZooKeeperContainer testcontainers.Container }
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.
Click to show internal directories.
Click to hide internal directories.