Help us shape the future of Go! Take the 2026 Go Developer Survey

clickhousestatic

package
v0.90.6 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(specJSON []byte, _ database.DB, logger *zap.Logger) (provisioner.Provisioner, error)

Types

type Provisioner

type Provisioner struct {
	// contains filtered or unexported fields
}

Provisioner provisions Clickhouse resources using a static, multi-tenant Clickhouse service. It creates a new (virtual) database and user with access restricted to that database for each resource.

func (*Provisioner) AwaitReady

func (p *Provisioner) AwaitReady(ctx context.Context, r *provisioner.Resource) error

func (*Provisioner) Check

func (p *Provisioner) Check(ctx context.Context) error

func (*Provisioner) CheckResource

func (*Provisioner) Close

func (p *Provisioner) Close() error

func (*Provisioner) Deprovision

func (p *Provisioner) Deprovision(ctx context.Context, r *provisioner.Resource) error

func (*Provisioner) Hibernate added in v0.87.0

func (*Provisioner) Provision

func (*Provisioner) Supports added in v0.53.0

func (p *Provisioner) Supports(rt provisioner.ResourceType) bool

func (*Provisioner) Type

func (p *Provisioner) Type() string

type Spec

type Spec struct {
	// DSN with admin permissions for a Clickhouse service.
	// This will be used to create a new (virtual) database and access-restricted user for each provisioned resource.
	DSN string `json:"dsn"`
	// DSNEnv variable that contains the clickhouse DSN.
	// This is an alternative to specifying the DSN directly, which can be useful for injecting secrets
	DSNEnv string `json:"dsn_env"`
	// WriteDSN is an optional DSN that should be used for write operations.
	// If a write DSN is specified, it will be used for the provisioning operations.
	WriteDSN string `json:"write_dsn,omitempty"`
	// WriteDSNEnv optionally specifies an environment variable that should be used to populate WriteDSN.
	WriteDSNEnv string `json:"write_dsn_env,omitempty"`
	// Cluster name for ClickHouse cluster operations.
	// If specified, all DDL operations will include an ON CLUSTER clause.
	Cluster string `json:"cluster,omitempty"`
}

Jump to

Keyboard shortcuts

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